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

23rd
Oct 2015
Nathan Racklyeft
@loudnate
Oct 23 2015 01:12
Hey all, let's move G5 BLE decoding discussion to https://gitter.im/bewest/decoding-dexcom
Ben West
@bewest
Oct 23 2015 05:43
got openaps tools able to post to NS for visualization:
blob
Dana Lewis
@danamlewis
Oct 23 2015 05:47
Prettttty :) (my brain thinks the ups and downs should be swapped. ) But cool!
Ben West
@bewest
Oct 23 2015 05:47
I think my brain might think that too
blob
Dana Lewis
@danamlewis
Oct 23 2015 05:48
Yea. More basal means above line, temp that's lower would be below.
Scott Leibrand
@scottleibrand
Oct 23 2015 05:48
Dana has an interesting theory that it's the parents who like the inverted display, and the PWDs who want it right side up. ;-)
Ben West
@bewest
Oct 23 2015 05:49
ok, I see
yeah, it's definitely inverted
no wonder I couldn't understand it
Dana Lewis
@danamlewis
Oct 23 2015 05:49
Based on 3 data points or so, super scientific ;)
:)
Scott Leibrand
@scottleibrand
Oct 23 2015 05:49
(I'm in the shouldn't-be-inverted camp)
Dana Lewis
@danamlewis
Oct 23 2015 05:49
Scott's an outlier :p
Ben West
@bewest
Oct 23 2015 05:49
that doesn't tell us if you think it's inverted now or not
hehe
ah, pushing down thing
hmmm maybe
Scott Leibrand
@scottleibrand
Oct 23 2015 05:50
First time I saw it I assumed it would be right side up. When I discovered it was inverted I told @jasoncalabrese and @MilosKozak that invented was confusing and should be swapped.
*inverted
Ben West
@bewest
Oct 23 2015 05:51
makes my brain weird
Scott Leibrand
@scottleibrand
Oct 23 2015 05:52
And once it's right side up, I think the shading should be from scheduled rather than from 0, and different colors for positive and negative temps.
Dana Lewis
@danamlewis
Oct 23 2015 05:52
I get the philosophy behind the inverted approach, but would require significant brain requiring to associate more insulin as a negative/below the line visualization and vice versa, and not sure that rewiring is good and/or necessary.
but maybe a toggle is needed so people can pick their poison
Scott Leibrand
@scottleibrand
Oct 23 2015 05:54
So is that just using Nightscout dev and oref0 ns-upload?
Ben West
@bewest
Oct 23 2015 05:55
yeah, and the new timezone tool
no
hmm
no
new tools in dev branch of oref0
Scott Leibrand
@scottleibrand
Oct 23 2015 05:56
where does the tz tool fit in?
Jason Calabrese
@jasoncalabrese
Oct 23 2015 05:56
with the dynamic range that's also on nsdev we have less space for the basal overlay, so probably need to do something different anyway
Ben West
@bewest
Oct 23 2015 05:56
mm-format-ns-treatments monitor/pump-history-zoned.json | curl -X POST --data-binary @- -H "content-type: application/json" -H "API-SECRET: $API_SECRET" bewest.labs.diabetes.watch/api/v1/treatments/
the tz tool creates the pump-history-zoned.json
Jason Calabrese
@jasoncalabrese
Oct 23 2015 05:57
could see having some options
Ben West
@bewest
Oct 23 2015 05:57
so similar to the upload-entries, but needs to be /treatments/ instead
Scott Leibrand
@scottleibrand
Oct 23 2015 05:57
Ah, bummer.
Ben West
@bewest
Oct 23 2015 05:57
did same thing for /profile/
Scott Leibrand
@scottleibrand
Oct 23 2015 05:57
Was hoping new dev would read entries.
Ben West
@bewest
Oct 23 2015 05:57
that's a really easy change though...
read entries?
I'm reading entries into openaps currently
oh, NS side
Scott Leibrand
@scottleibrand
Oct 23 2015 05:58
I mean was hoping c-r-m would do the viz based on entries, ya
Ben West
@bewest
Oct 23 2015 05:58
seems fine to read treatments, just put the data into treatments
Scott Leibrand
@scottleibrand
Oct 23 2015 05:58
no
Ben West
@bewest
Oct 23 2015 05:59
why not?
Scott Leibrand
@scottleibrand
Oct 23 2015 05:59
only human entered data belongs in treatments imo
Ben West
@bewest
Oct 23 2015 05:59
so put it in entries also
Scott Leibrand
@scottleibrand
Oct 23 2015 05:59
problem is de-duping
Ben West
@bewest
Oct 23 2015 05:59
if you look at the way I did it, you can still separate all the machine stuff out in query
Scott Leibrand
@scottleibrand
Oct 23 2015 05:59
hmm maybe...
Jason Calabrese
@jasoncalabrese
Oct 23 2015 05:59
I was thinking the post to treatments was temporary
Ben West
@bewest
Oct 23 2015 06:00
yeah, temporary, still working on getting the storage layer ported over everywhere
in meantime it seems fine
Jason Calabrese
@jasoncalabrese
Oct 23 2015 06:00
right now you could post to both or just entries
Scott Leibrand
@scottleibrand
Oct 23 2015 06:00
if we enter a 0.5U bolus into treatments, and then we start looping and upload it...
Jason Calabrese
@jasoncalabrese
Oct 23 2015 06:00
then later we could convert the entries to treatments on the fly
Scott Leibrand
@scottleibrand
Oct 23 2015 06:00
by default NS will show it twice and calculate double the IOB
Ben West
@bewest
Oct 23 2015 06:01
why would you double enter something that happens automatically?
Scott Leibrand
@scottleibrand
Oct 23 2015 06:01
Because you're out and about
and not looping.
We do that all the time with DIYPS.
at dinner, enter boluses. Get home after dinner and loop picks up.
Ben West
@bewest
Oct 23 2015 06:02
you can query treatments for just the machine data
Scott Leibrand
@scottleibrand
Oct 23 2015 06:02
Yeah, we could do that.
Just seems bad to have to bolt that distinction on.
Ben West
@bewest
Oct 23 2015 06:02
but NS will eventually support entries
Jason Calabrese
@jasoncalabrese
Oct 23 2015 06:02
so when you're out you enter on the pump right?
Scott Leibrand
@scottleibrand
Oct 23 2015 06:02
Better to have a wall between machine and human entered data.
When out we enter into DIYPS which posts to treatments.
Jason Calabrese
@jasoncalabrese
Oct 23 2015 06:03
so basicly the same as careportal
Scott Leibrand
@scottleibrand
Oct 23 2015 06:03
Ya
Jason Calabrese
@jasoncalabrese
Oct 23 2015 06:04
need to leave 1 pump at home and remote bolus it, then you'll stay in sync
:)
have the remote bolus do the upload
Scott Leibrand
@scottleibrand
Oct 23 2015 06:04
at the end of the day which collection doesn't matter if we do good deduplication, but I'm worried we won't at first, so better to not have the data conflated.
Heh, except when you only have one pump. :-)
and wasting insulin. :-)
Jason Calabrese
@jasoncalabrese
Oct 23 2015 06:06
but deduping is the key, don't see a way to avoid it
Scott Leibrand
@scottleibrand
Oct 23 2015 06:06
Yep
Our rule is simply to ignore any manually entered bolus within 5m or so of a pump-uploaded one.
Temps are conceptually easier since you don't have to worry about entry time mismatches.
Worst case you just think the temp started or ended a few minutes earlier or later. All you have to do is go with the pump data when they overlap.
Ben West
@bewest
Oct 23 2015 08:54
blob
Milos Kozak
@MilosKozak
Oct 23 2015 09:50
great. looks like ns - openaps connection was successfull
Jason Calabrese
@jasoncalabrese
Oct 23 2015 13:14
What's with the crazy long basal rate
Need to do some rounding
Jason Calabrese
@jasoncalabrese
Oct 23 2015 14:26
Invert?.png
top is without the inverting and less opacity
think it's better
Mark Brighton
@seattlebrighton
Oct 23 2015 14:48
Hey, as you guys are designing the inputs, keep in mind that you may want to capture heartrate, to auto-modify carb and insulin uptake rates, in the case of marathon runs (or my bike to work on weekdays but laziness on weekends) that totally changes how quickly treatments (insulin especially) impact BG. My HR monitor could get data into via xDrip very easily. Still working on Omnipod...
Matthias Granberry
@mgranberry
Oct 23 2015 14:58
How's this for brain-warping? I'd really like to see excess basal (or even IOB) as a shaded region below the SGV values to show what the expected outcome is.
If everything is dialed in right (which it never will be completely), the BG should drop as the IOB decays and everything should zero out as you reach the target BG.
Jason Calabrese
@jasoncalabrese
Oct 23 2015 15:17
yeah, I'd like to be able to turn on iob and cob
Ali Mazaheri
@amazaheri
Oct 23 2015 15:56
NICE NICE NICE
So which CRM build is good for me to deploy, and I would like to update my logic app to update the collection. not that I dont like ns-upload he he
Scott Leibrand
@scottleibrand
Oct 23 2015 16:00
@jasoncalabrese for shading, I think we should only shade the area in between a temp basal and normally scheduled basal, and should do two different colors for positive and negative, like we do for boluses and carbs.
Jason Calabrese
@jasoncalabrese
Oct 23 2015 16:01
yeah, I tried doing that, but couldn't figure it out
@amazaheri most is on dev, the new un-inverted is at nightscout/cgm-remote-monitor#1243
maybe different shades/opacities of blue? or patterns like hashing?
would be nice to have blue be insulin
Scott Leibrand
@scottleibrand
Oct 23 2015 16:13
That might work. I like having negative insulin and carbs be the same color though. I categorize things based on whether then lower or raise BG.
Shall I merge 1243? Looks like a good start regardless of what else we do.
Jason Calabrese
@jasoncalabrese
Oct 23 2015 16:20
sure
maybe we find a new color for carbs
Scott Leibrand
@scottleibrand
Oct 23 2015 16:25
I used magenta. Ugly as all get out, but highly glanceable. :-)
Milos Kozak
@MilosKozak
Oct 23 2015 16:30
using red in reports
Jason Calabrese
@jasoncalabrese
Oct 23 2015 16:32
red is overloaded already, mbg and urgent high/low
magenta with some opacity might be good
Ali Mazaheri
@amazaheri
Oct 23 2015 17:07
awesome deploying
Ben West
@bewest
Oct 23 2015 20:03
hmmm maybe site gone bad?
blob
Matthias Granberry
@mgranberry
Oct 23 2015 20:04
Insulin pools sometimes if I get dehydrated
Ben West
@bewest
Oct 23 2015 20:05
yeah, I'm dehydrated
had huge heavy protein meal
this happened last time I ate that meal
delayed carbs, all night
pretty cool to be able see what's happening though
still running the upload by hand...
need to do a few more things to prevent dupes
right now thinking of downloading treatments for NS as well
grabbing the last known, and slicing recent from last known till now an uploading just that
need to double check what sorting impacts events on it's way out of the pump... decocare originally produced items in exact order
but I think the iter_foo suff applies some sorting
the original order out of pump is important in getting most precise "story" of therapy
Ben West
@bewest
Oct 23 2015 20:10
because the memory is formatted in the order events happen, even for things that are mutable (like bolus records) and events where the operations are split over multiple events, you can use the strict ordering to help with your assumptions
unless the ordering has been changed