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

17th
Feb 2015
Toby Canning
@TC2013
Feb 17 2015 02:25
Deleted... I found the answer. @sulkaharo Thanks!
Scott Leibrand
@scottleibrand
Feb 17 2015 02:35
Can you share?
Chris Oattes
@cjo20
Feb 17 2015 02:37
One of the most annoying things on the internet: "I've got a problem....I KNOW THE ANSWER"
:P
http://xkcd.com/979/ thats the comic I was thinking of
Toby Canning
@TC2013
Feb 17 2015 02:49
Ha! I was asking if the mmcommander can be used interchangably with the carelink stick.
Scott Leibrand
@scottleibrand
Feb 17 2015 02:51
I saw that before you deleted it. So can it? :-)
Toby Canning
@TC2013
Feb 17 2015 02:51
Sulka wrote that it uses the "same RF protocol..." let me copy his quote to be on the safe side.
@sulkaharo wrote on Jan 19, "So - given the actual RF protocol is the same regardless of whether one uses CareLink stick or mmcommander, it'd be pretty awesome if the Medtronic protocol implementation was made in such a way that the stick specific wrapper code was separate from the actual protocol implementation, for as much code reuse between the two as possible."
Scott Leibrand
@scottleibrand
Feb 17 2015 02:56
Interesting. Do we have reason to believe decoding-carelink was implemented that way, or could be?
Toby Canning
@TC2013
Feb 17 2015 02:57
I ordered the CC1111 and will let you know if it works.
Scott Leibrand
@scottleibrand
Feb 17 2015 02:58
Cool. If it doesn't, I'm sure @bewest would love to help make it compatible, assuming it's feasible.
And I'd love to be able to get the extra range.
Toby Canning
@TC2013
Feb 17 2015 02:59
@bewest has been absolutely tremendous! We have updated ihawk to us his json output and Ben was instrumental is making that successful.
Scott Leibrand
@scottleibrand
Feb 17 2015 03:00
Nice.
Toby Canning
@TC2013
Feb 17 2015 03:01
I think we are getting close to having the new version of ihawk update the careportal with basal and bolus history--did you get that working already?
pulling the history from the pump that is.
I know that you mentioned there is some problem requiring a double bolus input???
Haven't got that far I guess!
We don't have any IOB calculator in our program yet.
Scott Leibrand
@scottleibrand
Feb 17 2015 03:03
We have been putting pump history into its own mongo collection for months now, but I still haven't gotten around to making Nightscout use it.
Boluses get copied over to treatments by the DIYPS code, but not basals.
Toby Canning
@TC2013
Feb 17 2015 03:04
why not basals?
Scott Leibrand
@scottleibrand
Feb 17 2015 03:04
Because they're not discrete and easy to work with.
I haven't replicated the code that does so in DIYPS over to Nightscout yet.
I do need to port it though.
Toby Canning
@TC2013
Feb 17 2015 03:07
I don't understand what you mean "not discrete and easy to work with" Apparently English isn't my native tongue, at least that's how I feel around programmers and such
Scott Leibrand
@scottleibrand
Feb 17 2015 03:08
Lemme start over. Nightscout already deals with boluses. Basals require new code. That's the fundamental difference.
Also, we model basals as a series of discrete boluses (which is actually how the pump delivers them too), but I don't want to visualize them that way.
Toby Canning
@TC2013
Feb 17 2015 03:10
Oh, I get it. I just want to know when our autopilot software sends a temp basal command. Rather than having it make a treatment history, we are pulling the treatment history from the pump--that is the idea any way.
Scott Leibrand
@scottleibrand
Feb 17 2015 03:10
But maybe that would be an acceptable first step. Just need to make it visualize negative boluses too.
Toby Canning
@TC2013
Feb 17 2015 03:10
Ha! Yes, let's hope our programmer doesn't have is sending an update every 3 minutes!
Scott Leibrand
@scottleibrand
Feb 17 2015 03:11
Yeah, I do that too (read from pump), but it's complicated by the fact we sometimes operate in manual entry mode too.
So we have to deduplicate too.
Toby Canning
@TC2013
Feb 17 2015 03:14
Maybe this will be more challenging than I thought. I spoke with the programmer on Sunday and I thought he said he would be able to finish this portion of the code up early this week, but he may have found a bunch of issues related to what you are describing?
Scott Leibrand
@scottleibrand
Feb 17 2015 03:16
Depends on what you're trying to do, really. I was able to do all the necessary math in DIYPS without much trouble. Only issue really has been the fact that I changed the way I model temp basals between when I coded manual entry and when I coded the convert-from-pump-records code, so deduplicating basals has been tricky.
I will bump up the priority on porting the basal-reading code over to the wip/iob-cob branch of Nightscout. We need it, and it sounds like you and others will too.
Toby Canning
@TC2013
Feb 17 2015 03:18
Oh good, thanks!
Would you mind emailing it to me?
Scott Leibrand
@scottleibrand
Feb 17 2015 03:23
I'll just be updating the wip/iob-cob branch of cgm-remote-monitor on github. Have you set that up yet?
Toby Canning
@TC2013
Feb 17 2015 03:24
Yes, I'm just not very good at looking through code yet, but I can manage!
Scott Leibrand
@scottleibrand
Feb 17 2015 03:24
We recently sent setup directions to nightscout-core-dev and openaps-dev if you need them.
Remind me later and I can point you to the actual commits that represent the new code once I've ported it.
Toby Canning
@TC2013
Feb 17 2015 03:24
I managed to find enough directions in the github issues reporting sections to make it work, LOL!
Sounds great, thank you.
Toby Canning
@TC2013
Feb 17 2015 03:36
@sulkaharo I referenced this article with you once before, but since I found it, I wanted to share. I mentioned that we use a lower carb diet for our son, but make sure not to go into the ketotic range (due to the issues described in this paper). When we went "too low" with carbs he became carb sensitive and couldn't tolerate even moderate carb meals without huge spikes. We eventually found a sweet spot that required built tolerance, but eventually was well tolerated. I think we started at 15g meals and slowly worked up. It keeps going up with his size too. Our son just hit puberty and has upped his carb intake to 40-50 grams per meal (he is 5'7" and 135lbs, sorry for not being metric). Now that he is older, we do a lot more responsible "splurging." We pre-bolus for those large carb meals and limit them to early in the day and once at night on the weekend. I am the one who pays the price for the late night dessert!
Growth dependence on insulin-like growth factor-1 during the ketogenic diet.
Spulber G, Spulber S, Hagenäs L, Amark P, Dahlin M.
Source
Department of Neuropediatrics, Astrid Lindgren Children's Hospital, Karolinska University Hospital, Stockholm, Sweden. gabriela.spulber@ki.se
Abstract
PURPOSE:
To examine the influence of the ketogenic diet (KD) on linear growth and insulin-like growth factor I (IGF-I) levels in children with pharmacotherapy-resistant epilepsy.
METHODS:
A prospective study was designed to evaluate growth, serum IGF-I levels, blood beta-hydroxybutyric acid (beta-OHB), and seizure frequency before and during KD in 22 children (median age 5.5 years). Growth was assessed by measurements of weight, height, body mass index (BMI), and height velocity. Standard deviation scores (SDS) were calculated for all measured parameters as well as for serum IGF-I to eliminate the influence of age- and sex-related differences among patients.
RESULTS:
Fourteen of the 22 patients responded to the KD. Weight, height, BMI, and height velocity decreased significantly during the KD. We found that the KD had profound influence on growth and IGF-I levels. No correlation was found between seizure response and growth alterations. Height velocity correlated negatively with beta-OHB during the KD. The slope of the regression of height velocity against IGF-I decreased significantly during the KD.
CONCLUSIONS:
Height velocity was most affected in those with pronounced ketosis, which implies that, in clinical practice, the level of ketosis should be related to outcomes in seizure response and growth. Our data indicate that growth disturbances and the decreased sensitivity of growth to similar IGF-I levels during KD are independent of seizure reduction. The metabolic status induced by KD may be the mechanism underlying both alterations of linear growth and seizure reduction.
Matthias Granberry
@mgranberry
Feb 17 2015 05:16
Does anyone have a recommendation for a starting point on IOB and insulin activity calculations? I am using a 2-part spline of 2nd-order least squares regressions fit to my Tandem pump's history events at the moment, but I'm open to ideas on a better approach.
Scott Leibrand
@scottleibrand
Feb 17 2015 05:18
My basic quadratic formulas are in the wip/iob-cob code. @kenstack has some more complicated ones based on the literature.
Matthias Granberry
@mgranberry
Feb 17 2015 05:23
The simple formulas work well in practice? My weights look pretty similar to yours when adjusted for a little longer DIA. Tandem's truncate a tail, though, and drop the last 5% or so of the bolus
Matthias Granberry
@mgranberry
Feb 17 2015 05:36
And is there a reason you don't use an indefinite integral for insulin action, or am I misreading point the activity part of the result?
Matthias Granberry
@mgranberry
Feb 17 2015 05:41
nevermind. It looks like an instantaneous BG velocity number
diabeticgonewild
@diabeticgonewild
Feb 17 2015 07:14
Woke up to a BG of 38. Dexcom saves the day...but I am freezing cold now!
Sulka Haro
@sulkaharo
Feb 17 2015 11:55
@TC2013 how high do you spike post meal? for us the carb absorption is not actually the big problem, it's the glycogen release. Carbs trigger it easily, but also just eating more than needed spikes the sugars really hard regardless of what's in the meal. The guy knows when to stop and if Eero says he's full, we now never press for more food and it'll cause a release taking the BG up by more than 10mmol very fast (at rate of 1.4 mmol/l / 5 minutes, or faster).
With low carb meals, we effectively a flat line on the CGM.
We're monitoring the ketones though and are eating enough carbs so ketones don't build up to the levels typically listed as ketogenic diet
So far the height and weight growth have followed the expected curve exactly as projected, so no signs of slowdown. If we'd see that, I assume we're change the diet.
Sulka Haro
@sulkaharo
Feb 17 2015 12:01
@TC2013 and @bewest it should be pretty easy to port decocare to work with the CC1111. The stick mounts as a serial device and has simpler wrappers for the data than other sticks. https://github.com/jberian/mmcommander/tree/master/src/MMsimulator has c source for a command line utility to listen to packets using the stick.
diabeticgonewild
@diabeticgonewild
Feb 17 2015 13:13

So you can now run any Android Wear app on a Pebble Watch now, which is good news for potential DexDrip users.

http://www.engadget.com/2015/02/17/pebble-android-wear/?utm_medium=twitter&utm_source=dlvr.it&utm_campaign=Engadget&ncid=rss_semi

Who knows how "compatible" it actually is though. So the only thing that has to be done for a DexDrip is pretty much soldering. I hate soldering but I might give DexDrip a try now.

I don't know if it's notifications only or not, but it appears to have functionality graphically.
diabeticgonewild
@diabeticgonewild
Feb 17 2015 13:40
It's summed up here: http://www.androidauthority.com/pebble-android-wear-587830/
The arrival of Android Wear app compatibility to the Pebble is a major boon for the platform, and instantly increases the number of apps that can be used with the watch on Android. Of course, some of these apps won’t be as useful as they would on an actual Android Wear watch due to the Pebble’s lack of a microphone for voice response, but this is still a great step in the right direction. With the Pebble priced at just $100 and with a battery life that substantially one ups actual Android Wear watches, the Pebble just got a little bit more interesting.
diabeticgonewild
@diabeticgonewild
Feb 17 2015 14:23
The Android Wear watchface for DexDrip, or any Android Wear watchface, does not sound like it would be supported directly on the Pebble watch. Just notifications would be supported.
Toby Canning
@TC2013
Feb 17 2015 16:16
@sulkaharo This the tool we use to calculate glycemic variablity. There are 4 tabs to the document and explain things fairly well. https://drive.google.com/file/d/0B83od6l3vRHnNjhfNERJWDI3ems/view?usp=sharing
Scott Leibrand
@scottleibrand
Feb 17 2015 16:41
@mgranberry: yes, the simple formula works quite well. Resulting curve is very similar to the one the Medtronic pumps use, and the resulting predictions are typically right on (within the accuracy/precision of the sensor, and modulo any random excursions)
Toby Canning
@TC2013
Feb 17 2015 18:02
@sulkaharo I know you mentioned you get great range for listening with the CC1111, but do you know or does anyone know if you get a better transmission range with the CC1111 over the carelink stick?