nightscout / trio-oref

MIT License
7 stars 4 forks source link

rT.variables in mg/dL #30

Open mountrcg opened 3 months ago

mountrcg commented 3 months ago

First part of fix for #29

Check in Trio needed to find where suggestion.isf is used and apply a glucoseformatter to it. I did not find deviation and BGI being transferred to Trio from oref.

mountrcg commented 3 months ago

Checking on rT.target_bg, there seems to be an error in the calculation of insulinForManualBolushttps://github.com/nightscout/trio-oref/blob/d1dfb7099d59e4f7779e5fc5c75f8ca299d91ef2/lib/determine-basal/determine-basal.js#L1623 as it uses a non converted glucose value eventualBGand a converted glucose value target_bg, which will screw up that value for mmol users. Changing rT.target_bg also into non converted value - it duplicates current_bg though.

mountrcg commented 3 months ago

successful test documented in Trio PR https://github.com/nightscout/Trio/pull/327