Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 31 2019 15:51
    xen0n starred openaps/oref0
  • Jan 31 2019 15:12
    cclauss opened #1191
  • Jan 31 2019 15:09
    cclauss edited #1190
  • Jan 31 2019 15:08
    cclauss edited #1189
  • Jan 31 2019 15:07
    cclauss edited #1190
  • Jan 31 2019 15:07
    cclauss opened #1190
  • Jan 31 2019 15:00
    cclauss synchronize #1189
  • Jan 31 2019 14:52
    cclauss opened #1189
  • Jan 31 2019 14:10
  • Jan 31 2019 14:06
    Owaisaaa starred openaps/docs
  • Jan 31 2019 12:20
    cclauss synchronize #22
  • Jan 31 2019 12:16
    cclauss opened #22
  • Jan 31 2019 12:11
    cclauss edited #21
  • Jan 31 2019 12:09
    cclauss opened #21
  • Jan 31 2019 11:31
    tuzoenduro commented #1406
  • Jan 31 2019 11:25
    cclauss opened #140
  • Jan 30 2019 05:53
  • Jan 29 2019 16:03
    tzachi-dar commented #1406
  • Jan 29 2019 14:46
    rostag starred openaps/oref0
  • Jan 27 2019 22:06
    PieterGit synchronize #1176
eyim
@eyim
This message was deleted

Okay another example of where openaps not doing what I would think it would do. The situation is where he is low and stays low. It looks like openaps simply tries to cancel a high temp if there is one but doesn't try to implement a low temp basal. Basically when Dexcom shows a low, it just reads 39 the entire time. Therefore tick and avg delta = 0 if you stay low for a while and you get this:

{"delta":0,"glucose":39,"avgdelta":0}
{"duration":33,"rate":0,"temp":"absolute"}
{"iob":1.2243434921930496,"activity":0.06642615555555557,"bolusiob":0}
{"max_iob":6,"type":"current","dia":5,"current_basal":0.8,"max_daily_basal":1.1,"max_basal":3.5,"min_bg":120,"max_bg":120,"sens":80}
IOB: 1.22, Bolus IOB: 0.00
Avg. Delta: 0.0, BGI: -26.6
15m deviation: 80
BG: 39+0 -> 21-21 (Unadjusted: -59--59)
BG 39<110, avg delta 0>0; no high-temp to cancel

If he stays in this situation for more than the 30 minutes then any temp basal implemented as he is dropping runs out and no new low temp basal in enacted which I think it should. Several ways to address this. The first to deal with this exact scenario of it reading 39 and staying 39 but I think openaps should have some feature that says if below some cutoff it recommends a temp basal of 0 regardless of any projections or other calculations. This would be safest. The temp basal in the calculation above was one we put on manually.

Here is the chart. The scenario is that he goes to bed at around 125 but with a lot of insulin. My wife gives him 12 carbs of sugar and turns off his basal for 2 hours. The openaps system was sitting at this desk where he was studying so when he went to bed it was out of range but presumably it would low temp him like my wife as done. He begins to drop a little while later and we begin to feed him a ton of sugar at that point but regardless he goes low on the Dexcom and stays there for more than an hour. I move the openaps into range around 12:30 am once he has already hit low and it gives the recommendation above. I even temporarily turn off the low basal that we manually put on to see if that would make a difference but it gives the same recommendation - no high-temp to cancel rather than recommending a low temp basal.

Luckily by blood his bg had already shot up but I think this is the case if someone goes low and stays low, openaps should be recommending a 0 temp basal the entire time no matter what the other metrics are saying

Scott Leibrand
@scottleibrand
Yeah, you're probably right. FWIW, the situation you're seeing is that the BGI says he "should" be dropping by 26 (!) mg/dL every 5 minutes (no wonder he hit 39!) but it sees him dropping far less than that, so it figures something is keeping his BG up and doesn't low-temp. That logic works pretty well at 70, but not so much at 50, and definitely not at 39, where the +0 is a complete artifact.
What would you say the "extend 0 temp no matter what" threshold should be?
eyim
@eyim
For us, it would be 70. If he is below 70 we leave off his basal. It can cause him to shoot higher than we like on the rebound but it seems safer to me. Others without the issues we have to deal with may be more comfortable with something lower say 50 or 60
Scott Leibrand
@scottleibrand
And thanks for reporting this. This is the kind of thing we really want to get fixed ASAP to be as safe as possible when it matters most.
I'm inclined to go with 55, since it's Dexcom's hypo alarm threshold.
eyim
@eyim
That makes sense to me
Scott Leibrand
@scottleibrand
Fortunately this 39+0 thing does not apply above 39: you have to actually have carbs working in order to keep from dropping, and those are likely to finish absorbing before any temp could ever take effect.
So if you're 60+0 and BGI is -20, we know the carbs are working.
And the minute we see they're not and he down-ticks, we will low-temp again.
another simple fix would be to change the < to <= to just handle the +0 case
but I think I like the 55 threshold better.
eyim
@eyim
Yes definitely an outlier problem with the 39 artifact. I agree <= would handle this as well
Scott Leibrand
@scottleibrand
Or more likely both.
eyim
@eyim
Yep
Scott Leibrand
@scottleibrand
can you do me a favor and open an issue under oref0 so I don't forget this?
eyim
@eyim
Yes - sorry to keep you up
Scott Leibrand
@scottleibrand
anything serious should automatically be flagged as an issue: can't be forgetting things. :-)
no worries, just finally getting sleepy about now.
We should also add explicit test cases for this scenario.
for the 39+0 as well as the before and after.
You could probably do that part.
eyim
@eyim
Yes test cases are on my list of things to do
Jason Calabrese
@jasoncalabrese
55 sounds good, other option is to introduce new thresholds
Ali Mazaheri
@amazaheri
+1 on 55
in general I also rely on notifications to avoid going that low by manual carb correction, that with openaps low temps always work.
fjungman
@fjungman
I usually just lurk, but the hypo topic is on my mind. I think temp to zero at 55 is a little late. Just fought a terrible hypo last night, after one on Saturday. If it was drifting down, slowly, then 55 is maybe ok, but still leaves the T1D with possible effects from low already. If dropping sharply, it is way too late. Remember, a non-T1 would be 80 to 100, so there is no reason to keep delivering insulin at 80 with a downward trend.
Dana Lewis
@danamlewis
@fjungman sorry to hear :/ note though that in many cases, it's temping even around 120, depending on what your range is.
55 or related threshold being discussed here is regardless of IOB (in many cases it's already -1.0u), zero temp just as an extra safety margin
fjungman
@fjungman
Here is the scenario from last night. Kid was 250 after installing a new sensor. He had zero IOB and zero carbs, basal rate just went to half for the night. He took 5.5 units (should bring him down about 135 pts). Here is the picture. ![alt]https://goo.gl/photos/9dheAFgcjEhkeHkD7 Did ten finger pricks with different meters and strips, all agreed he was low. Had to do a full glucagon. He leveled, ten minutes later (after a couple hours of this) he shoots up. I've never seen a low so hard to stop, and not related to anything we could think of. Triple-checked that the pump had only given 5.45 units, and nothing for several hours before. If I hadn't suspended when he started to crash, this could have been worse. So, the zero temp seems pretty important. Sorry, just really shaken from last night...
Dana Lewis
@danamlewis
Ouch, indeed :( :(
Scott Leibrand
@scottleibrand
yeah, that's not good. if you were running openaps, it probably would have low-temped as soon as bolus snooze started to decay from the 5.45U. what is his ISF and DIA?
Dana Lewis
@danamlewis
As we're talking about scenarios for when LGS-type default mode might kick in, I see three categories to consider/test, curious if there's any others. One, if you're drifting down: temps can actually prevent you from going low. Two, going down more rapidly, possibly from a combo of factors: temps can help prevent the low from being as bad, but you might still dip low. you may or may not end up wanting to do a few carbs depending on if you're awake & how you feel. Three: WHOOSH, you're going low, for whatever reason, and you're likely going to need carbs regardless of loop: but, low temp can help a tiny bit, and also might play a role in recognizing when you have whopping amounts of negative IOB and prevent you from double-rebounding from negative IOB and overtreating carbs, as many of us tend to do if we're going down that fast.
Lori
@LoriLori
not temping to 0 because DIA/2 not yet passed is not good I think
and DIA/2 either good idea, needs different way to handle different DIA curve for bulus
Scott Leibrand
@scottleibrand
have you started using the loop yet? I think DIA/2 is one of those things that's hard to understand how it'll actually work until you see it in action.
short of actually looping, the best thing is probably to read/write test cases
the main challenge is, without 100% reliable carb entry, we don't know if that bolus was due to carbs or correction
once I know @fjungman's DIA I can roughly calculate when it would have low-temped
Lori
@LoriLori
sorry, not looping because I need to rewrite it so I can understand it, pretty much adding rules one by one, currently at rule low suspend :(
Scott Leibrand
@scottleibrand
but without bolus snooze, we would be low temping every time you meal bolus, which could be counterproductive
Lori
@LoriLori
its nice project, its just too complicated to hold for me in my head so I need to rewrite it so I can look and see
Scott Leibrand
@scottleibrand
after LGS, next is probably to calculate eventualBG based on net IOB and ISF
Dana Lewis
@danamlewis
@LorelaiL have you look at HAPP to see the manual recommendations?
Scott Leibrand
@scottleibrand
and set low/high temp as necessary to bring eventualBG back into range. but at that point you'll also want the safety check of "don't high-temp when falling"
Lori
@LoriLori
2nd issue is my sensitivity and dia curve/activity are way off what I experience
fjungman
@fjungman
ISF is 1 unit to drop 25 points
DIA is 1 unit for 5 carbs
Scott Leibrand
@scottleibrand
no, that's IC ratio. DIA is insulin lifetime (duration of insulin action)