Skip to content

external insulin to the bolus shortcuts.#607

Merged
marv-out merged 5 commits intonightscout:devfrom
avouspierre:external-insulin-to-shortcut
Jul 3, 2025
Merged

external insulin to the bolus shortcuts.#607
marv-out merged 5 commits intonightscout:devfrom
avouspierre:external-insulin-to-shortcut

Conversation

@avouspierre
Copy link
Contributor

Add toggle for external insulin to shortcut action #528.

Behavior

If toggle, the Insulin will be added to IOB but it will not be delivered.
Not dependant of the settings configuration about the bolus available in shortcuts but maxBolus is checked.
Translation is available

English French
image image

Add toggle for external insulin to shortcut action nightscout#528.
Not dependant of the settings configuration but maxBolus is checked.
Copy link

@kingst kingst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code LGTM and I tested it on the simulator -- it appears to be working

Copy link
Contributor

@dnzxy dnzxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code generally looks good to me and it works (tested in-vitro).
I have two change requests:

  1. External insulin when added in-app via treatment view is guarded by maxBolus x 3. Here we would allow any number. Please apply the same max bound check and an appropriate error, if a user attempts to enter say 5x max bolus insulin.
  2. I would change the wording from "immediately applying" to something that conveys the nature of "you log this, but the pump does nothing, you have to inject / take the dose" in a more intuitive way. In the app we call this "Log External Insulin". Maybe using that phrase (once as a question "How much external insulin do you want to log?", once as a statement "Logging xxx U of external insulin.") may be clearer for users.

@dnzxy
Copy link
Contributor

dnzxy commented Jun 17, 2025

Hi @avouspierre. Are you able to take a look at this PR anytime soon? If not, does someone else maybe want to take over and collaborate with Pierre? Maybe @dsnallfot or @bjorkert ?

- add guardrail about max bolus if external insulin as Trio (3 x max bolus)

- change the label "apply" ➡️ "log"
@avouspierre avouspierre requested a review from marv-out as a code owner June 29, 2025 18:45
@avouspierre
Copy link
Contributor Author

HI @dnzxy ,

Lately but a update of this PR with :

  • add guardrail about max bolus if external insulin as Trio (3 x max bolus)
  • change the label "apply" ➡️ "log" when external insulin.

Copy link
Contributor

@marv-out marv-out left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please solve the merge conflicts, add the missing "n" (see comment in BolusIntentRequest) and add a condition to the confirmation message that clearly distinguishes between the logging of external insulin and bolusing actual insulin. Currently if you enable the confirmation message for logging external insulin it also says "Are you sure to bolus x U of insulin"

So in fact two minor changes, then this is good to go 🚀

@marv-out marv-out merged commit 435c9d9 into nightscout:dev Jul 3, 2025
3 checks passed
Sjoerd-Bo3 pushed a commit to Sjoerd-Bo3/Trio that referenced this pull request Jul 6, 2025
…o-shortcut

external insulin to the bolus shortcuts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants