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

12th
Jun 2015
diabeticgonewild
@diabeticgonewild
Jun 12 2015 02:10
@jasoncalabrese I got a working % IOB remaining function for Novolog. I used this paper Insulin aspart has a shorter duration of action than human insulin over a wide dose-range for the graph and I interpolated the values on the glucose infusion rate graph for 12 U/kg which is about 0.2 U/kg in this study. For creating the actual IOB function I followed Measurement of Insulin Absorption and Insulin Action paper
See this is an 8 hour IOB function, which is comparable to the MM 530G 8 hour IOB functions and others
Novolog.jpg
we could create other, or extend this one to work for specific pumps
diabeticgonewild
@diabeticgonewild
Jun 12 2015 02:16
Thank you. I just have to fit the functions ranging from 2-8 hours in 30 minute increments...I will do a pull request when I am ready. Feeling good tonight :D
I also used the derivative (which was the original line fitting function) and I integrated it and hence that graph See: https://twitter.com/wilddiabetic/status/603108332652466176 and the pic I am about to upload
I can also send the papers that I used your way if you PM me. I will give you my school address.
Jason Calabrese
@jasoncalabrese
Jun 12 2015 02:19
think we need to put more thought into the structure of the iob property, its an object with a few fields
diabeticgonewild
@diabeticgonewild
Jun 12 2015 02:20
Novolog_Derivative.jpg
As in plugins?
Like the thing is, I don't really do OOP (object oriented programming). I know it's an excuse but I am trained to deal with data structures primarily, but I am willing to learn.
How about drop-down boxes, and a "display all IOB functions"
Jason Calabrese
@jasoncalabrese
Jun 12 2015 02:21
yeah it's returning this
return {
      iob: totalIOB,
      display: utils.toFixed(totalIOB),
      activity: totalActivity,
      lastBolus: lastBolus
    };
display shouldn't be there
lastbolus is the last treatment with any insulin
activity isn't used now but was used in iob/cob for bgi
and we probably want to get that back
diabeticgonewild
@diabeticgonewild
Jun 12 2015 02:25
Yeah, you could go wild with activity...like you can figure out how well the IOB curve fits based off of that...
I also want to make +/- 5, 10, 15, and 20 percent functions of the activity for IOB error, cause according to the paper I used to fit the functions, there is a +/- 20% error on the glucose infusion rate (insulin activity)
diabeticgonewild
@diabeticgonewild
Jun 12 2015 04:44
This isn't the final Novolog function...I still have to process it some more, but you can see that the curve is very simlar to the 530G IOB function...
This message was deleted
Novolog4Real.jpg
diabeticgonewild
@diabeticgonewild
Jun 12 2015 04:49
530G.jpg
I still have some work to do with it though...
Like basically, I have to fit the function to a scale of 100%. The graph of Novolog, as is, right now, is basically the values with 5% confidence intervals (extremes removed), but not fitted to an actual % remaining function...
diabeticgonewild
@diabeticgonewild
Jun 12 2015 04:54
It requires too much thinking for me to do tonight...I might start working on like Apidra or Humalog tonight...like the "hand work" for NS.