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

11th
Sep 2015
Ben West
@bewest
Sep 11 2015 00:57
Scott Leibrand
@scottleibrand
Sep 11 2015 01:13
do they have numbers on deaths? I don't see anything in a quick skim
Ben West
@bewest
Sep 11 2015 01:14
there's been some other, more recent claims on deaths
I think the current stat is 1 in 5 die of insulin overdose/dead-in-bed
Scott Leibrand
@scottleibrand
Sep 11 2015 01:14
1 in 5 of what?
of total T1D deaths?
Ben West
@bewest
Sep 11 2015 01:14
t1s using insulin, not sure
oops
5%, 1 in 20, sorry
still very high, though
I recall seeing an article attributing rise in hypoglycemia in hospitals to increased number of deaths
Dr. Judith Cope's article, which appeared in the May, 2008, Pediatrics journal, provided new safety data from a 10 year retrospective study of adverse events with adolescent use of insulin pumps. There were 1594 injuries reported in children and adolescents; 82% of reported cases resulted in hospitalizations and 13 reported deaths.
from the fda article
A common theme of insulin pump problems experienced in the adult and youth populations involved the pump's failure to administer a proper insulin dose.
Ali Mazaheri
@amazaheri
Sep 11 2015 01:23
Fda is emperor palpatine
Ben West
@bewest
Sep 11 2015 01:23
unfortunately, the takeaway from that article is to blame the user, and say they need proper selection, education, and monitoring
Sulka Haro
@sulkaharo
Sep 11 2015 04:33
@scottleibrand for unit tests with node, run make on latest nightscout and see what happens
The iob.js in NS is covered by the tests. If you can add more complex calculations, that'd be awesome
Scott Leibrand
@scottleibrand
Sep 11 2015 04:55
sweet, thanks.
Oskar Pearson
@oskarpearson
Sep 11 2015 07:10
Heya all. Any ideas here? I stopped getting glucose data:
# openaps --version
openaps 0.0.5
# openaps use pump read_glucose_data 50
[]
Page 49 stopped late last night
I then rebooted the pump (it needed a battery change) and then started getting data - but there's a missing block of about 5 hours
722 model medtronic
Nathan Racklyeft
@loudnate
Sep 11 2015 16:38
Hey Oskar, has the glucose data returned?
Oh sorry, I see your comment now. I've experienced this as well, and it seems to happen when the pump gets to the end of a glucose page.
Have you tried reading ISIG?
I have a few theories. One is that glucose data is just duplicate values and the care link download and pump display is based on ISIG * calibration factor.
The other is that the read current glucose page number command is incorrect during the page turns
It lasts about 4 hours for me too,
Oskar Pearson
@oskarpearson
Sep 11 2015 17:35
It's returned, yep. I'll try check if the official app can read the glucose data if/when it happens again
Once again, I'm full of questions:
Should iob run on normalized_history.json, or just history.json?
It seems that the iob.js expects "pumpHistory[i]._type" https://github.com/openaps/openaps-js/blob/master/bin/iob.js#L103 while normalized history contains just "type"
Scott Leibrand
@scottleibrand
Sep 11 2015 17:41
Yeah, we discussed yesterday: we need to switch over from iob.js to the IOB tracking stuff in openaps-predict. For now though, iob.js expects non-normalized data.
Oskar Pearson
@oskarpearson
Sep 11 2015 17:41
aha. Ok. I missed that - sorry.
Scott Leibrand
@scottleibrand
Sep 11 2015 17:41
It was a call, not here.
Oskar Pearson
@oskarpearson
Sep 11 2015 17:41
:)
So, if I've got openaps-predict working, I shouldn't worry about the openaps-js prediction algorithm?
Scott Leibrand
@scottleibrand
Sep 11 2015 17:42
Unfortunately there's no public dosing algorithm that works with openaps-predict yet.
What we need is to modify openaps-js to use the mmhistorytools output.
Oskar Pearson
@oskarpearson
Sep 11 2015 17:43
brb
Scott Leibrand
@scottleibrand
Sep 11 2015 17:43
And swap out iob.js for Nate's better-tested IOB calculator.
The openaps-js determine-basal.js is probably the dosing algorithm we want to use for baseline.
It would of course be better to modularize it a bit for customizability, but IMO it's pretty solid and ready for more people to test it.
Oskar Pearson
@oskarpearson
Sep 11 2015 17:59
I'll look at modifying openaps-js then. If I get somewhere, I'll submit a PR
hang flang, perhaps I've misunderstood. Do you want determine-basal re-written in python so that it matches the rest of the openaps-predict project? Or do you want to change things just so that they can fit together - using the same data format from mmhistorytools?
Scott Leibrand
@scottleibrand
Sep 11 2015 19:07
the latter
they should all be plugins, so it doesn't matter if they're python or js
we might want to do an intermediate step of modifying iob.js to read normalized pump history
or we might want to skip straight to modifying openaps-predict to output its intermediate IOB data as a file that determine-basal.js could read
loudnate/openaps-mmhistorytools#30 may also help
Oskar Pearson
@oskarpearson
Sep 11 2015 19:25
Would anyone have a file that iob.js or determine-basal.js could read which they would be willing to send me? Since I don't have a dexcom, and I think the file formats are different, I've got no way of testing my work.
Lori
@LoriLori
Sep 11 2015 19:57
@oskarpearson this might be useful https://github.com/bewest/openaps-example
Rachel Sandlain
@audiefile
Sep 11 2015 21:01
What should git HEAD point to? apparently my setup points to 'something strange'
Oskar Pearson
@oskarpearson
Sep 11 2015 21:05
@audiefile won't you post the error you're getting?
Could I check my understanding of https://github.com/openaps/openaps-js/blob/master/bin/determine-basal.js#L233 with someone? My understanding is it tries to determine the number of units that are scheduled in the next hour. However, my input data looks like this:
{
  "duration": 0,
  "rate": 0.75,
  "temp": "absolute"
}
Rachel Sandlain
@audiefile
Sep 11 2015 21:07
pi@raspberrypi ~/myopenaps $ git fsck
error: HEAD points to something strange (refs/head/master)
Checking object directories: 100% (256/256), done.
error: refs/heads/master does not point to a valid object!
notice: No default references
Checking connectivity: 39896, done.
dangling blob 5a1bbe18bf47502dc883aad7af800b2c79f63819
dangling blob fc27669dd0674bc4a8d088e18f4110f79913bc86
dangling blob e42b6e370e2c4c5f8a05e39f47e83ad5829ff951
plus a bunch more dangling blob messages
I think that line is calculating the impact of a temp basal on net iob. Not temp running no impact on iob which is what that input is indicating
If you do read_temp_basal when there isn't a temp running the duration will be 0. If there is one running the duration is how many minutes are left
Oskar Pearson
@oskarpearson
Sep 11 2015 21:13
Actually, you can ignore me. I think it's just a misleading message... reason = temps_data.rate + "<" + rate; seems to say that it's setting that value because of the existing temporary basal rate, but the else if a few lines up is actually ignoring the basal rate.
@audiefile That's your directory with openaps.ini in it, right?
That seems to happen a bunch when the pi is unplugged - the git directory gets corrupted. It's unfortunately a common issue on the Pi
Rachel Sandlain
@audiefile
Sep 11 2015 21:15
ah that's probably it. I've had the battery it was connected to die on me more than once
do you know if there's a way I can clean it up without destroying everything?
Oskar Pearson
@oskarpearson
Sep 11 2015 21:17

I'm at the stage where I don't really care about the git history - so I would do this. I'd make a backup first and then reset the git directory.

Not sure if it's appropriate for your situation

cp -Rav ~/myopenaps ~/myopenaps-backup   # Backup
cd ~/myopenaps  # Make sure this works or you will delete the wrong directory
rm -rf .git # Clear out old git directory files
git init .   # Create a new git repo
git add -A  # Add everything to it
git commit -m "Initial version"   # Commit the initial version
You don't need to paste anything after the '#' symbols
You should also consider backing up everything in that directory to your computer, rather than just having it on the pi
Also - when you want to disconnect it, you should log in via ssh and run sudo showdown -h now
Rachel Sandlain
@audiefile
Sep 11 2015 21:19
I'm not super concerned with the git history just the actual files.
Oskar Pearson
@oskarpearson
Sep 11 2015 21:19
Then the above would do it
Rachel Sandlain
@audiefile
Sep 11 2015 21:19
My backup is unfortunately out of date I think.
I do try to shutdown properly but I know the battery died last night so it didn't shut down cleanly
Paul Andrel
@stavlor
Sep 11 2015 21:23
@audiefile git reset?
Oskar Pearson
@oskarpearson
Sep 11 2015 21:23
I've not had success with git reset when HEAD is messed up
Rachel Sandlain
@audiefile
Sep 11 2015 21:39
thank you @stavlor and @oskarpearson! git reset didn't work but Oskar's suggestions did
Dana Lewis
@danamlewis
Sep 11 2015 23:45
We've had a lot of issues with git as well