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

3rd
Jul 2015
Nathan Racklyeft
@loudnate
Jul 03 2015 00:47
Re: record types, I met David at http://openmhealth.org/ if anybody is interested in driving applicable formats for pump dosing. I'm not sure I have time but I could connect. cc @mgranberry @jasoncalabrese
Nathan Racklyeft
@loudnate
Jul 03 2015 02:07
Sorry to catch up so late to the thread, but you can record carb intake using a BolusWizard and then zero out the insulin. It will appear in pump history. Since "Capture Event" was introduced in the x23, this is an option for "correction carb" recording in earlier models. cc @scottleibrand
honestly I think many of us look forward to a future of recording carb intake somewhere else beside the pump, e.g. a phone/watch app entering a meal to [Google Fit / Apple HealthKit / Microsoft Health] and remote bolusing via rileylink
Scott Leibrand
@scottleibrand
Jul 03 2015 02:36
No, bolusing with zero insulin doesn't write a bolus wizard entry, at least on the pumps I tried it on.
Nathan Racklyeft
@loudnate
Jul 03 2015 03:31
@scottleibrand hmm, it's possible. I can try a 522 later. Here's a 723:
[
  {
    "_type": "BolusWizard", 
    "bg": 0, 
    "bg_target_high": 120, 
    "_description": "BolusWizard 2015-07-02T20:25:49 head[2], body[15] op[0x5b]", 
    "timestamp": "2015-07-02T20:25:49", 
    "_body": "1e500050285a000096000000009678", 
    "_head": "5b00", 
    "unabsorbed_insulin_total": 0.0, 
    "correction_estimate": 0.0, 
    "date": 1435865149000.0, 
    "_date": "71d914620f", 
    "bolus_estimate": 3.75, 
    "appended": [
      {
        "_type": "UnabsorbedInsulinBolus", 
        "_description": "UnabsorbedInsulinBolus unknown head[14], body[0] op[0x5c]", 
        "data": [
          {
            "amount": 2.6, 
            "age": 117
          }, 
          {
            "amount": 0.6, 
            "age": 327
          }, 
          {
            "amount": 0.65, 
            "age": 357
          }, 
          {
            "amount": 0.6, 
            "age": 367
          }
        ], 
        "_body": "", 
        "_head": "5c0e6875041847141a6514186f14", 
        "_date": ""
      }
    ], 
    "bg_target_low": 90, 
    "carb_ratio": 8.0, 
    "food_estimate": 3.75, 
    "carb_input": 30, 
    "sensitivity": 40
  },
if you complete the bolus wizard with 0 U, you'll end up with a record like this, but no following Bolus record.
Ali Mazaheri
@amazaheri
Jul 03 2015 05:17
@bewest I think I found the issue, for some reason pumphistory has future time as time stamp.
read_clock shows a right time but look at Bolus time stamp {
"programmed": 0.4,
"_type": "Bolus",
"_description": "Bolus 2015-07-02T21:21:36 head[4], body[0] op[0x01]",
"timestamp": "2015-07-02T21:21:36",
"_body": "",
"_head": "01040400",
"duration": 0,
"amount": 0.4,
"date": 1435900896000.0,
"type": "normal",
"_date": "64d555020f"
},
read_clock reading was "2015-07-02T22:09:14"
Scott Leibrand
@scottleibrand
Jul 03 2015 05:48
Weird.
Ali Mazaheri
@amazaheri
Jul 03 2015 05:56
For now I reverted the code back to using lastTimeStamp till we figure out
Scott Leibrand
@scottleibrand
Jul 03 2015 05:57
K. Be aware that if nothing is happening (no pump events) IOB will be wrong.
But once it takes action to correct that it'll get recalculated.
Ali Mazaheri
@amazaheri
Jul 03 2015 05:57
correct
Scott Leibrand
@scottleibrand
Jul 03 2015 05:57
So it might temp and then immediately want to revert.
Sulka Haro
@sulkaharo
Jul 03 2015 07:22
Idea for triggering the push notifications based on bolus need - this could actually auto-calculate the push threshold based on a fraction of total recent daily insulin dose
Tell user to bolus if bwp > 2.5% of daily need
Scott Leibrand
@scottleibrand
Jul 03 2015 07:45
Yeah, that seems like a reasonable approach. Maybe a lower threshold, though: 2% or even 1.5%?
Jason Calabrese
@jasoncalabrese
Jul 03 2015 08:03
displaying status like TDD, time in range, etc will be nice
need to find a compact way to show a preview
diabeticgonewild
@diabeticgonewild
Jul 03 2015 18:42
Yeah so how do I debug JS? I obviously jacked this up and @jasoncalabrese owned me nightscout/cgm-remote-monitor#564
I finally woke up a little bit...for the first time in a week.
Nathan Racklyeft
@loudnate
Jul 03 2015 18:52
You can open the developer tools in Chrome. It's in the menu as View -> Developer
ah but you might be using the nodejs runtime?
Matthias Granberry
@mgranberry
Jul 03 2015 19:06
Don't feel too bad. He was busy fixing warnings all over the place the other day
diabeticgonewild
@diabeticgonewild
Jul 03 2015 19:28
I guess I would be using nodejs
Jason Calabrese
@jasoncalabrese
Jul 03 2015 19:31
@diabeticgonewild all the comments on that PR came from Codacy, automated static analysis, not from me
I just setup up the tool so it has my name on the comments
don't worry about it, but if you want to try getting an override plugin to work I can help
diabeticgonewild
@diabeticgonewild
Jul 03 2015 19:38
Got it. Will be PMing you when I get home.
Scott Leibrand
@scottleibrand
Jul 03 2015 19:44
@jasoncalabrese: My new favorite tool: https://t.co/HLE2bv3uSU - Node debugging just like Chrome Dev Tools http://t.co/UG9RArkFu3
(that was a quote from Jason's tweet that addresses Monica's debugging question, not something I'm saying addressed to him).
Ben West
@bewest
Jul 03 2015 20:00
main thing is to organize code so that you can test little bits of it
I like to be able to type node and be able load everything into my interactive shell and play around with it
should be able to test things within 4 - 8 expressions
Nathan Racklyeft
@loudnate
Jul 03 2015 20:01
:+1: to that.
Nathan Racklyeft
@loudnate
Jul 03 2015 20:07
speaking of node, I really love the json CLI package, especially the --group command. I filed a ticket to add something similar as an openaps plugin for history records, combined with deduping.
along the lines of
$ cat `openaps use pump read_history_data 0` read_history_data.json | openaps use munge group -
diabeticgonewild
@diabeticgonewild
Jul 03 2015 20:21
Thanks! I'm still not used to JS or its extensions. I'm more partial to Python and of course MATLAB...
diabeticgonewild
@diabeticgonewild
Jul 03 2015 21:26
wow made a dumb programming mistake but found my error. Go me.
Scott Leibrand
@scottleibrand
Jul 03 2015 21:37
To err is human, to debug divine?
diabeticgonewild
@diabeticgonewild
Jul 03 2015 21:37
This message was deleted
Dana Lewis
@danamlewis
Jul 03 2015 21:40
If there's no bugs, there's definitely something wrong because it couldn't possibly be right? That's my philosophy :)
diabeticgonewild
@diabeticgonewild
Jul 03 2015 21:41
Yeah, true.
I didn't mean to delete my above post. But I did on accident. It just said "IDK"
Yeah I need to get to work on things. Pretty much was a sloth for like a week...
But that's what happens when you get sick, I guess.
I need to get some stuff from my Pi...like files so I can program some stuff in MATLAB...
Too lazy not to do it in MATLAB for now...
diabeticgonewild
@diabeticgonewild
Jul 03 2015 21:55
Now I want to sleep....no!
Scott Leibrand
@scottleibrand
Jul 03 2015 23:14
Sleep is ok. Especially if it means you'll feel better later. There's no deadline here.