tconnectsync icon indicating copy to clipboard operation
tconnectsync copied to clipboard

Feature Request: Option to adjust values to correct for use of U-200 insulin

Open JasonJShuler opened this issue 2 years ago • 3 comments

I use U-200 insulin in my pump (per endo's orders), and of course the pump doesn't understand anything other than U-100, so any values reported by the API that represent units of Insulin administered need to be doubled. The incorrect numbers in the t-connect site created some major confusion - it seems like it would be nice at least for NS to have the correct values.

Thanks!

JasonJShuler avatar Feb 21 '22 04:02 JasonJShuler

Hi Jason,

While this would be a relatively simple change to perform on the tconnectsync side, I wonder whether changes for this would make more sense within Nightscout? Could you set your Nightscout profile settings to be doubled, resulting in the same overall effect?

If this is primarily a visual concern (e.g., you input 2u on the pump with u-100 insulin, but you want to think of it as being 4 "regular" units), then I feel like tconnectsync mutating the values when ingesting them into Nightscout might make things more rather than less confusing. But I might just not be fully understanding your use case.

jwoglom avatar Feb 21 '22 04:02 jwoglom

Maybe this video will help explain the use case: https://youtu.be/7gIQXNPQLe4

Less than 6 minutes, I tried to cover the problematic math (I made the video while trying to convince my endo that she had accidentally written my prescription for 1/2 of what I need)

If the pump says it administered some number of ml of insulin, this would be accurate. If, however, it says it administered 6-units, this is not correct. It administered 12-units. 1 unit of insulin is 1 unit regardless the concentration; the problem is that the pump doesn't understand U-200. The pump settings have all been either doubled or halved so that it administers the correct dose; it just reports the dose wrong. If I enter a manual bolus, I must divide the desired dose by half, and when reading reports I must double the values.

The "unit" values in t-connect are completely incorrect - I would I could erase them and reload with adjusted values. Milliliter values, on the other hand, would be accurate insomuchas the pump did administer the reported volume of the liquid in the tank.

Does any of this help? I don't mind if I need to customize the code - especially if nobody else is asking for it. Also don't mind doing the legwork.

Thanks!

JasonJShuler avatar Feb 22 '22 00:02 JasonJShuler

You should be able to modify the source code to do this by adding a * 2.0 in these places:

https://github.com/jwoglom/tconnectsync/blob/163db98/tconnectsync/parser/nightscout.py#L26

https://github.com/jwoglom/tconnectsync/blob/163db98/tconnectsync/parser/nightscout.py#L27

https://github.com/jwoglom/tconnectsync/blob/163db98/tconnectsync/parser/nightscout.py#L45

https://github.com/jwoglom/tconnectsync/blob/163db98/tconnectsync/parser/nightscout.py#L63

I'll keep this GitHub issue open in case others see a need for building this directly into tconnectsync.

jwoglom avatar Feb 22 '22 05:02 jwoglom