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

22nd
Feb 2015
diabeticgonewild
@diabeticgonewild
Feb 22 2015 01:28
Nice, :) I was going to ask you for that!
Matthias Granberry
@mgranberry
Feb 22 2015 02:54
I miss my university library access. I need to find a dept that is willing to accept a volunteer in exchange for a "treat as employee" appointment here at UT.
diabeticgonewild
@diabeticgonewild
Feb 22 2015 03:09
yeah I will get it for you @mgranberry
So the calculations that I described above, so far are correct, from steps 1-5
past step 5 is wrong, but easy to fix
diabeticgonewild
@diabeticgonewild
Feb 22 2015 03:15
so step 7 should be 50-((((peak insulin measurement in plasma-value at point)/peak insulin measurement in plasma))/2)100). Easy fix.
Matthias Granberry
@mgranberry
Feb 22 2015 03:15
@diabeticgonewild The pharmacodynamics, measured by the glucose infusion rate clamp studies in T1 adults have been closer to my experience than curves fit to package inserts/plasma glucose graphs. There aren't a lot of studies on it, though. Walsh had a paper a few months back in one of the diabetes tech journals complaining about it.
diabeticgonewild
@diabeticgonewild
Feb 22 2015 03:15
Step 4, for the stuff being divided, it should be multiplied by 100. Easy fix
This is based on a high carb meal, and the plasma insulin concentration dosage
for it
I will look into it. I am like 1/3 of the way done with what I said I was going to complete by morning
diabeticgonewild
@diabeticgonewild
Feb 22 2015 03:37

Yeah, I found a clamp study using Apidra, Humalog, and Novolog (open access): http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3554283/

Like Hyaluronidase is used to increase subcutaneous absorption.

I found another reference in another paper saying that it was the most reliable method, as everything is adjusted to euglycemia, so you were right @mgranberry . I will go with that.
diabeticgonewild
@diabeticgonewild
Feb 22 2015 08:45
finished the Apidra modeling. Have Novolog and Humalog to go! (It won't take that long...it's just kind of boring!)
Matthias Granberry
@mgranberry
Feb 22 2015 19:16
The hyaluronidase insulin mixes sounded like a great idea when I saw a presentation based on that paper. I really had issues with variable absorption times on Teflon cannulas. It seems like a good and safe short term solution to the slow insulin problem for obtaining a stable optimal control system.
diabeticgonewild
@diabeticgonewild
Feb 22 2015 19:39
So, insulin on board is a really weird concept mathematically and as a graphical representation. I just determined what I did last night was wrong, and although it can be fixed, it would involve extrapolating data that cannot be reliably interpreted without having the original data points due to needing the most minimum values.
So, I delivered a 10 unit bolus to my t:slim, Animas 2020, Medtronic 522, and Medtronic 530G at the same time, and I have been writing down IOB for each of those pumps, and I am going to extrapolate the data that way.
It's more precise anyways, as I have numerical values as a function of points at every time interval of 5 minutes. I intend on modeling all of those pumps.
I have been doing it for 3 hours now. 2 hours left.
Matthias Granberry
@mgranberry
Feb 22 2015 20:18
@diabeticgonewild I can write you some code to pull it out of T:Slim data if you want
diabeticgonewild
@diabeticgonewild
Feb 22 2015 20:19
It's fine. I have 1:15 to go on all 4 pumps :D
Thank you though!
Toby Canning
@TC2013
Feb 22 2015 20:28
I sent you the Medtronic file with every single percentage on a minute by minute bases for all 5 hours, so you can forgo that model if you want.
model = type of pump
I can't wait to see the differences!
diabeticgonewild
@diabeticgonewild
Feb 22 2015 20:42
Cool I will check it out!
Toby Canning
@TC2013
Feb 22 2015 21:00
@danamlewis @scottleibrand Do you have your temp basal reductions follow the DIA curve as a negative?
Matthias Granberry
@mgranberry
Feb 22 2015 21:00
@diabeticgonewild the t:slim pump outputs IOB and a daily basal total whenever it does a basal delivery tick. It makes it really easy to see what was going on historically. Too bad the web software throws so much away, although the IOB data is still pretty good in the data export.
@TC2013 I haven't written that part yet, but my plan was to convert basal delivery to a series of boluses when basal tick records come in.
then the insulin-handling code would all be the same
Toby Canning
@TC2013
Feb 22 2015 21:03
Yes, that is how our system is working too. Logic tells me the absence of insulin could be tracked over the same DIA curve that a positive bolus could, but my brain (which isn't logical) tells me that a basal reduction has more immediate effect.
Matthias Granberry
@mgranberry
Feb 22 2015 21:05
it takes 1-2h for me to notice a real effect of basal reductions (or increases), which is pretty close to how boluses of similar sizes work. I don't worry about bolusing for missed insulin more than about once an hour, either. Things stay pretty linear up to 2h. Any longer than that and the liver starts getting angry and bad things happen.
Matthias Granberry
@mgranberry
Feb 22 2015 21:13
The reality is that basal rate adjustments probably do peak faster than boluses because the volume is lower and thus the duration of action will be lower. I'm just not convinced that it's worth worrying about at the stage I'm at. I have considered making the DIAs scale nonlinearly based on estimated plasma concentration vs. patient mass, but a system should be able to decrease insulin based on the downward curve near the target and reduce basal rates just due to the BG descent rates. I really need to review my optimal control theory text and characterize Scott and Dana's system with a laplace transform. It looks like it is probably a stable basic linear control system optimizing for minimal insulin use. Such a system should be relatively robust to variations in DIA, within limits
Toby Canning
@TC2013
Feb 22 2015 21:16
That makes sense that very small adjustments would follow a much shorter curve, just as small meals do.
Matthias Granberry
@mgranberry
Feb 22 2015 21:16
but I haven't done any math towards it and my background is computer science with an emphasis on discrete math, linear algebra, and professionally a fair helping of statistic, not electrical engineering or control theory -- those tend to be a lot heavier on calculus, differential equations, and the like.
Matthias Granberry
@mgranberry
Feb 22 2015 21:22
@TC2013 but I suspect (and have not verified) that the basal adjustment timing depends largely upon how much insulin is active. In the absence of exercise, my blood glucose never seems to fall much faster than drinking high-GI drinks can raise it, but a large dose seems to stay at-peak longer. If only I were a billionaire, I'd have a control theorist go wild studying things like this.
Scott Leibrand
@scottleibrand
Feb 22 2015 21:36
Yeah, we model foregone basal insulin as a series of negative boluses.
The insulin activity curve is the same, inverted.
The dose dependence of the activity curves doesn't seem to matter for the size boluses we do (up to 4U).
And we haven't seen any larger reaction to zero temp basals up to 2h in duration.