nightscout / Trio

Trio - an automated insulin delivery system for iOS based on the OpenAPS algorithm with adaptations.
https://docs.diy-trio.org/en/latest/
MIT License
98 stars 526 forks source link

Basal, carb ratio, and insulin sensitivity testing. #417

Open Natolida opened 1 month ago

Natolida commented 1 month ago

Is your feature request related to a problem? Please describe.

Provide a clear and concise description of the problem. Explain how this issue affects your experience with the Trio app and any specific scenarios where it occurs.

The emergence of DIY systems has unquestionably revolutionized the management of diabetes for individuals. Even those with inadequately adjusted basic settings can derive benefits from these systems. However, the most frequent request for assistance I often encounter relates to users not taking the time to test and titrate their basals, carb ratios, and insulin sensitivity factors.

For the past seven years, I've been using DIY systems, and my settings are finely tuned. A decade ago, I was unaware that I had the option to self-titrate my settings, and I heavily relied on my health care team for this. It was a revelation when I discovered that I could adjust my own settings. This newfound control not only improved my management but also increased my time in range, bringing a positive change to my life with diabetes.

While I have the technical ability to assist with documentation, logging, and testing. I do not have the technical ability to pull something like this off. However, I do feel like people would benefit from it.

Describe the solution you'd like

Detail the desired change or feature you'd like to see implemented in the Trio app. Be specific about how this solution would improve your experience and address the problem described above.

What If we included functionality within Trio to support and empower users to self-titrate these basic settings? Could we improve the user experience of those using Trio? Could we help our users further increase their time in range? Could we help our users spend a little less time managing their diabetes?

I don’t think we need to reinvent the wheel here. There are so many resources out there that assist users in self-adjusting settings. I love the book ‘Pumping Insulin’. It has some great resources that provide graphical representations of when and how to adjust your settings. Could we create a report within Trio that presents data similarly?

Describe alternatives you've considered

List and describe any alternative solutions or features you've considered that could also address the problem. Explain why you believe the proposed solution is the best option.

Additional context

Include any other context, screenshots, or relevant information that might help in understanding the issue or the proposed solution. If applicable, describe any previous discussions or decisions that relate to this feature request.

Basal Testing:

Screenshot 2024-09-25 at 12 39 35 pm

Carb Ratio Testing:

Screenshot 2024-09-25 at 12 41 22 pm

ISF Testing:

Screenshot 2024-09-25 at 12 41 57 pm

Technical Details

If applicable, provide any technical details or considerations that might impact the implementation of this feature. This could include dependencies, potential risks, or required changes to existing functionalities.

User Impact

(Optional) Describe the impact of this issue on your use of the Trio app. Include any specific examples or data that demonstrate how widespread or severe the problem is.

dsut4392 commented 1 month ago

It sounds like a wonderful idea, albeit a lot of work to implement, particularly in a way that would be usable and safe for the people who need it most. On the practical side, without adding significant workflow, logic, and math, ensuring the app has enough information to make sound recommendations is also difficult. First of all, we need a proper 'open loop' mode in which we can run basal/ISF/CR testing while retaining the ability for the app to deliver oref calculations and have low-glucose-suspend protection. Existing reporting solutions such as Nightscout can give you nice plots of BG vs IOB and carbs, but there are often additional contextual factors like unrecorded carbs or exercise that are important. Apps like Lukas Schuster's Diabetes Cockpit are also useful for understanding settings. Leaving aside the many practical difficulties, automating individualised settings guidance within the app is stepping across the line from implementing user-chosen settings to 'providing medical advice', which has significant ethical and legal considerations.

Natolida commented 1 month ago

Given the workflow, logic, and math behind the Oref algorithm, I understand the complexity of implementing such a tool. However, I feel setting testing should only occur in an open-loop mode. That way, users can be sure that the algorithm's interference with data interpretation is free. While there are ways to adjust settings by visualising and interpreting data while maintaining a close loop, this goes beyond the skillset of the everyday user. I see this being utilised as an extended application onboarding process. Such a tool would encourage new application users to maintain an open loop and test settings. Ultimately, I feel it promotes a culture of safety by ensuring users have their settings dialled in before closing the loop. Initial implementation could be as simple as plotting CGM data over a modified electronic render of one of the above graphs. However, detailed documentation and guidelines would have to be created to support consistent use.

Sjoerd-Bo3 commented 1 month ago

@Natolida I like your idea, but also get @dsut4392 point. Maybe we can make or refer (in-app) to a tool that does this?

I think we need to think about this in some way. Thank you for sharing!

Natolida commented 1 month ago

So Loop has LoopFollow and Loop CareGiver. Is there a plan for a Trio companion application? Or are we going to leverage off these existing applications? This could be an inclusion in a Trio companion application with additional reporting functionality? I like the name "TrioMate" :)

dsut4392 commented 1 month ago

Yes, there are two slightly different approaches that are still in private forks of Trio, with the remote actions being triggered via Loop Follow App.

Natolida commented 1 month ago

Regarding ethical considerations and the provision of medical advice, the whole aim of this feature is to empower users to make independent decisions regarding their diabetes management. While it is intended to assist users with their decision-making, the user ultimately remains responsible for implementing those changes and must consider their unique circumstances.

Is there anything I can do to help get this off the ground?

Sjoerd-Bo3 commented 1 month ago

Maybe we can chat further about this on discord. Because it is more on the side do we want to do this.

Natolida commented 1 month ago

Can do mate. I'll put something up now.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Sjoerd Bozon @.> Sent: Wednesday, September 25, 2024 8:22:45 PM To: nightscout/Trio @.> Cc: Natolida @.>; Mention @.> Subject: Re: [nightscout/Trio] Basal, carb ratio, and insulin sensitivity testing. (Issue #417)

Maybe we can chat further about this on discord. Because it is more on the side do we want to do this.

— Reply to this email directly, view it on GitHubhttps://github.com/nightscout/Trio/issues/417#issuecomment-2373678882, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIDX2WRNUCK4EUCJM2IAOYLZYKFHLAVCNFSM6AAAAABOZRBJAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZTGY3TQOBYGI. You are receiving this because you were mentioned.Message ID: @.***>