-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Pending Bolus calculation heuristic is potentially dangerous #273
Comments
I like the first resolution personally |
It's a bit complicated by the fact that on older (x22) pumps, the record isn't added to the history until the delivery is finished. Add in that older pumps deliver insulin slowly, and you have quite a long time before a bolus is added to the history (tops out at 16minutes on x22 @25u). We may need to maintain a list of 'unconfirmed boluses', along with their expected delivery times, to be able to clear them out reliably. |
If we track bolus confirmation more accurately, it should apply to #131 |
I personally also like the 2nd solution ("unconfirmed bolus'") more because it allows to do accurate additional corrections in the mean time and doesn't block the interface for very long. |
Makes sense @ps2 |
Just ran into this (or something quite like it) today. Running Loop v1.4.0. Entered carbs for part of my breakfast, then accepted the bolus recommendation, which delivered successfully. A few minutes later (after bolus was completed, but before it was pulled from pump into history), I entered more carbs, and the bolus recommendation was the amount needed for both sets of carbs, i.e. it was bigger than it should have been by an amount equal to the previous bolus. I noticed it and manually subtracted, but it would be easy for a user to make a mistake here. Not sure about the best resolution - one option would be just tracking pending boluses as @ps2 suggested, and either subtract that from recommended bolus, or at least provide that info to the user on the bolus screen. If this isn't the same issue, let me know and I'll open a separate one. |
I actually saw the same thing today. Did a bolus for my main meal, but a few minutes later added more carbs for a cookie and it recommended a bolus that seemed way too big. I ignored it, and decided to bolus a much smaller dose, and thought I should write up an Issue, but yeah +1 for what @elnjensen said |
This is a know issue, I think.
Loop should really wait until the next successful history read from the
pump before allowing bolusing again.
…On Tue, Aug 8, 2017 at 3:35 AM, David Cintron ***@***.***> wrote:
I actually saw the same thing today. Did a bolus for my main meal, but a
few minutes later added more carbs for a cookie and it recommended a bolus
that seemed way too big. I ignored it, and decided to bolus a much smaller
dose, and thought I should write up an Issue, but yeah +1 for what
@elnjensen <https://github.com/elnjensen> said
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#273 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAE2aqM5u_eGdtmBy3Gvwu5e0st_UKoHks5sV7tNgaJpZM4K40i4>
.
--
Jan Dittmer <jdi@l4x.org>, http://l4x.org
|
Just ran into this again tonight. Entered 30 g carbs, accepted bolus recommendation of 2.15u, saw that bolus was starting. About 7 minutes later, I decided the carb count was a bit low, so I entered 10 g more carbs. (New carb entry, not edit of the old one.) Recommended bolus was 2.75u, and "Active insulin" showed as 0.17u. (I didn't deliver the bolus.) My carb ratio for this period is 10g/u, so that bolus recommendation was clearly for all the carbs, not just the new 10g. About 2 minutes later, the recommended bolus was down to 0.575u, and then showed the active insulin from the previous bolus. So the risk window isn't super long, but it's there. I've attached an issue report, plus screenshots of the two bolus recommendations. Let me know if more info is useful. |
has anyone had an issue with larger bolus recommendations as described in this issue since updated Loop versions? We have not seen any issues like this for quite a long time...i think the pending boluses have been tracked well for us. Just checking if this issue needs to remain open or is ready to close? |
I haven't seen this for a long time either. |
Closing |
In LoopDataManager.swift
Afaict from the code, lastBolus is set if a Bolus has been successfully enacted. In insulinEffect, didSet the lastBolus var is cleared if it is older than 5 minutes.
There seems to be no mechanism which makes sure the Bolus has actually been read from the pump event history (or reservoir data). Hence if this doesn't happen and the user Bolus again there is a potential for going low.
Second issue I see is that if a user bolus' again within the 5 minute window, the last one is silently overwritten. So if let's say the first one is 3 Units, the second one 1 Unit, and the user enters another Carb-Meal, it will only substract the 1 Unit, not 4 Units from the calculated amount.
I'd think there are at least two different ways of fixing this:
In any case, this should probably be addressed rather soon if someone can confirm this is actually a problem.
The text was updated successfully, but these errors were encountered: