These are chat archives for nightscout/intend-to-bolus

23rd
Feb 2015
diabeticgonewild
@diabeticgonewild
Feb 23 2015 00:31
Just woke up and I am low. 22. Loading mouth full of Gummy bears. yay.
Ben West
@bewest
Feb 23 2015 00:31
eesh
I just had my 4:30 low also :-)
chugging some OJ
maybe now that my cgm is telling me pump is working I can change the basal to avoid the afternoon low
diabeticgonewild
@diabeticgonewild
Feb 23 2015 00:32
Yeah, I am OK though cause I caught it. LOL. CGM is off.
That's good
I guess it is time to charge my CGM. I let the battery die on it a day ago, and I never got it back up and running.
Retested: 31 now
diabeticgonewild
@diabeticgonewild
Feb 23 2015 00:42
62 now. See my stomach empties better when my BG is low. Life is good. I am going to (conservatively) bolus for the massive gummy bear consumption and sleep for a little bit. And charge my CGM, of course. Even if you have lows like that, they don't necessarily have to be scary. I knew I was very low when I tested and I just treated it and moved on with my life, and then took corrective action.
Dominik Stefan
@DominikStefan
Feb 23 2015 01:09
To gummi bears and corrective action! :smile: I'm recovering from a 54 as we speak. But smarties came to my rescue, lol.
as opposed to gummi bears
by low, do you just mean in the non-diabetic range?
or even lower then that?
diabeticgonewild
@diabeticgonewild
Feb 23 2015 01:15
both
higher blood sugars delay gastric emptying. lower blood sugars cause faster gastric emptying.
Yeah, I'm only 109 after consuming a ton of gummy bears, so I guess I was probably very low for awhile. Going to set a temp basal of 50% for 2 hours, and sleep a little bit. My body really needs to rest after stuff like this because my autonomic nervous system is shot from the rare autoimmune disease I have.
Dominik Stefan
@DominikStefan
Feb 23 2015 02:01
I hear that. For me, everything just works better when I'm in the non-diabetic range - I don't sweat so excessively, my heart rate isn't abnormally elevated, my breathing isn't artificially labored - it's too bad that all this energy goes towards symptoms instead of absolutely anything else, lol (ie, something more productive). I hope my diabetes gets diabetes.
Matthias Granberry
@mgranberry
Feb 23 2015 02:32
My CGM just went from 140 to 79 in one tick, fingerstick read 79, so kudos to the MARD score on that one, but it leaves me a little unsure how to proceed.
Scott Leibrand
@scottleibrand
Feb 23 2015 02:53
@mgranberry: get your NS set up with raw data
usually when we see it drop that much, it should've dropped earlier, but had switched to filtered.
With raw, you can see the drop ~10m earlier.
Scott Leibrand
@scottleibrand
Feb 23 2015 03:12
got temp basals visualized (as +/- 0.1U boluses) in nightscout last night: https://www.dropbox.com/s/mdkh342nuljqvtg/Screenshot%202015-02-22%2019.11.28.png?dl=0
it takes pump data from decoding-carelink that's been uploaded to the pump collection in mongo, and translates that to 0.1U boluses at the appropriate intervals, and then adds that to the treatments data structure in client.js so they can all be visualized the same as normal boluses (except negative boluses are shown in white like carbs)
there's undoubtedly a better way to visualize it, but that was fairly easy to do once I figured out how to read the data from mongo and get it into the websocket.
Scott Leibrand
@scottleibrand
Feb 23 2015 03:17
@jasoncalabrese I also changed the hollow circle outlines to just be semicircles to make them easier to differentiate visually, and made everything a bit smaller to deal with the tighter BG spacing on wip/iob-cob
Toby Canning
@TC2013
Feb 23 2015 03:20
Yeah, that's what we ended up doing, just using the careportal entries. We load the temp basals issued by the loop directly into the treatments collection.
Your treatment decision making looks different than ours based on the output, but mine needs lots of work.
Spent all day on it :)
Scott Leibrand
@scottleibrand
Feb 23 2015 05:03
I dislike mixing actual pump records of what really happened with human-entered records (treatments)
we can be a lot more certain that if there is a record of something in the pump collection, it really happened
whereas you need to give humans the ability to edit human-entered things
so I put them into two different collections and read from both
diabeticgonewild
@diabeticgonewild
Feb 23 2015 13:38
I would agree with @scottleibrand . I will finish up the IOB stuff this morning after cardiology tests...yay
Jason Calabrese
@jasoncalabrese
Feb 23 2015 15:58
thats a nice start @scottleibrand wonder how that will work with the treatment grouping we were talking about, do you want them on the trend line? Maybe at the top would be good? I was thinking about doing something like that from the care portal, where you enter temp basal and it would insert multiple insulin treatments in the future. To do that we'd need to know the basal settings, would those go into the profile?
diabeticgonewild
@diabeticgonewild
Feb 23 2015 15:58
Yeah so it probably won't be done until later this afternoon. I'm getting an echocardiogram and they messed up the scheduling. But I will post the respective equations to the OpenAPS group
Scott Leibrand
@scottleibrand
Feb 23 2015 16:13
@jasoncalabrese Ya I already have current basal rate in our profile, which it is using (even for retrospective) now. Need to get it to use the entire basal profile and pick the appropriate basal rate for each temp to calculate net.
i want a better visualization: having 0.1U boluses all over the trend line is too busy. But it'll do for now.
I just removed labels, made the semicircles bigger, and made the white ones magenta to see them better. Really ugly, but quite readable.
Matthias Granberry
@mgranberry
Feb 23 2015 16:16
@diabeticgonewild Thanks for doing the work, Monica. Fitting curves to euglycemic clamp studies has been on my to-do list for a number of months now, but I hadn't gotten around to it. I really appreciate the hard work.
Jason Calabrese
@jasoncalabrese
Feb 23 2015 17:33
@scottleibrand I'm thinking little overlapping rectangles at the top for temp basals
would be nice to have a label of what the increase/decrease was
so +10% or 110% depending on the format
should be able to do that in the mainline
1 row for temp basal and another for combo/extended boluses
Scott Leibrand
@scottleibrand
Feb 23 2015 17:43
Maybe make the color indicate +/-, and the thickness (height) represent magnitude.
Also, have the negative ones show below a centerline, and positive above.
diabeticgonewild
@diabeticgonewild
Feb 23 2015 17:52
You're welcome @mgranberry but I only fit it to the plasma insulin concentration curve not the glucose infusion rate curve, which IOB, which is a funky function that is more complex than that, is based off of.
Matthias Granberry
@mgranberry
Feb 23 2015 17:57
clearly I have more research to do
diabeticgonewild
@diabeticgonewild
Feb 23 2015 18:00
Same here. That's why I am extrapolating the data from the 4 pumps I have and I am doing it that way. I saw a paper that graphically described IOB, and you would have to rely on the minimum values of the glucose infusion rate too much to want to rely on it based on approximation because the values are too small.
You would also have to do extrapolation past the unknown approximated mins. See the graph on this document http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3045234/#!po=42.9688
Matthias Granberry
@mgranberry
Feb 23 2015 18:17
John Walsh is one of the few researchers that really seems to "get" T1 control issues. His research is a good place to start. I remember thinking that this paper was interesting when I read it, but I no longer have access to it. http://dst.sagepub.com/content/8/5/1035.full
diabeticgonewild
@diabeticgonewild
Feb 23 2015 18:51
I might have access to it. I am (quickly) looking. Working on IOB for tandem t:slim in MATLAB.
yeah I have access to it. If you PM me your email, I will send it your way.
Actually, it says I have access to it, but sometimes with this publication, sometimes I don't so I am double checking right now
diabeticgonewild
@diabeticgonewild
Feb 23 2015 18:59
Yeah, it says I have access to it but I actually don't. I can get it through inter library loan if you want it though.
Matthias Granberry
@mgranberry
Feb 23 2015 19:10
has anyone tried nightscout with a nexus 5? I'm not having a lot of luck, but it is probably my host cable setup
yep. A different cheap chinese cable with a connector that isn't warped works fine.
diabeticgonewild
@diabeticgonewild
Feb 23 2015 19:43
That's good. I got the Tandem t:slim whole number percent IOB remaining approximation function created. It's a 5th order polynomial linear autoregression equation. The equations are all the same for all of the DIAs because I had to normalize it (which varies by DIA, but it's easy to do) in order to get the equation to converge.
But the RMSE (root mean square error) is around 0.3 % for all of the Tandem t:slim approximations
Matthias Granberry
@mgranberry
Feb 23 2015 20:05
I just got NS up and running. Do I need to manually blast insulin/carb data into mongo to make the wip/iob-cob branch work? I already added a profile.
Scott Leibrand
@scottleibrand
Feb 23 2015 20:24
Turn on the care portal (there's a labs page on nightscout.info) and you can enter it that way.
Matthias Granberry
@mgranberry
Feb 23 2015 20:25
ah. I don't have an MMT pump.
nm
Scott Leibrand
@scottleibrand
Feb 23 2015 20:26
That's different.
We do have the ability to upload pump data from MDT, but care portal is for manual entry.
Matthias Granberry
@mgranberry
Feb 23 2015 20:35
Thanks. I have it going now.
Toby Canning
@TC2013
Feb 23 2015 21:28
Does anyone know who is the person managing pump donations? I think I found a family willing to donate a 508.
Dana Lewis
@danamlewis
Feb 23 2015 21:29
I asked James wedding but he hasn't responded
Toby Canning
@TC2013
Feb 23 2015 21:30
No rush... unless you asked him a week ago ;)
Dana Lewis
@danamlewis
Feb 23 2015 21:31
I did and then I re pinged him last week again to move it back to the top of his inbox ;)
diabeticgonewild
@diabeticgonewild
Feb 23 2015 22:42
I got the linear/least squares autoregression fits (equations) approximating IOB for the Tandem t:slim, Animas 2020, Medtronic 522, and Medtronic 530G pumps. The order of the polynomials range from 4-7, and all of the fits converge in MATLAB. The Medtronic 530G had the closest fit and the nicest curve, in my opinion, but who knows if it is the closest physiological IOB approximation. I am testing out the equations right now. Will be done in 15 minutes and will be posting to OpenAPS dev group.
Scott Leibrand
@scottleibrand
Feb 23 2015 23:39
TC2013: maybe we just need to do it ourselves. Maybe drop a note to the list and see who claims it first?