Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft single InsulinPlugin proposal, with Insulin selection within Profile plugin #3782

Draft
wants to merge 12 commits into
base: dev
Choose a base branch
from

Conversation

Philoul
Copy link
Contributor

@Philoul Philoul commented Jan 25, 2025

Draft PR, to propose a new unique Insulin plugin (to replace the 4 existing one)

Be carefull, this is a draft working branch not stable (to only install on a dev environment, frequent crashes, DON'T use on a real LOOP)

This has been done with a lot of back and forth to help me structure a proposal... So just to start discussion and illustrate the result (I will re-write all the code step by step if idea is accepted...)

To explain the proposal:
One Insulin plugin to manage the default insulin (used within active profile), and allow management of additional insulin (manual bolus with pen for example)

  • Within this plugin, iterface is close to profile management: + Button to add a new insulin, X button to delete an insulin, a grey "Magic Wand" icon to automatically propose a unique and explicit name for the insulin (insulin name can be customized)
  • A new insulin is created using templates (the previous insulin plugin are replaced by 4 templates with Fix or custom peak, and default DIA). (if free peak template is selected then both parameters can be adjusted, if it's another template, then only DIA can be adjusted)
  • I included 2 tabs in Insulin plugin, the first to set insulin parameters and see insulin curves, the second to show Profiles that have current insulin selected
    My idea is when an insulin is created, no profiles used this insulin, but if an insulin used within profiles is modified, then all profiles are updated. (but application is applied with a required Profile Switch after the update)

Note that profile tab is just an empty slot in this draft proposal ;-)

Rules I imagine on Insulin and profile management:

  • Any new insulin can be created at any time. But when you create a new insulin it is used nowhere (within no profiles)
  • You have one default insulin within Insulin Plugin, it's the insulin included in current active profile
  • When you create a Profile Switch from Overview or Action tab, you can only select profiles with the same insulin
  • For safety reason, the only way to change default Insulin (so to select a profile with another insulin that the current default) is to do the PS from Profile Plugin (with a warning to prevent wrong manip, this should be done just after a reservoir or pod change with a different Insulin than previous one)
  • When you create a manual bolus, it's applied and recorded with default insulin
  • When you "Record Only" a manual bolus, then this can be done with an external pen, so you can select any existing insulin within Insulin Plugin profile

I included several screenshots to illustrate some views... Fell free to comment!

In screenshot below, first row show Insulin Creation within insulin Plugin (only one most of the time ;-) )
In second row example of Manual bolus within Insulin selection
In third row View Within profile Plugin (selection of Insulin), and example of about 20 profiles, but only the 3 first in the list updated with Lyumjev insulin. First one is active profile, so only the updated with the same insulin can be selected from overView...

image

@Philoul Philoul changed the title Todo/InsulinPlugin Draft single InsulinPlugin proposal, with Insulin selection within Profile plugin Jan 25, 2025
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.

1 participant