JohanDegraeve / xdripswift

xdrip for iOS, written in Swift
GNU General Public License v3.0
316 stars 310 forks source link

Incorrect metrics reported by the app #528

Closed sergiotome closed 2 months ago

sergiotome commented 2 months ago

Sorry if this may have been reported already. I quickly checked the list of issues and couldn't find it. I didn't check all of the facebook posts to see if it could be there...

The problem is that on the bottom part of the home screen there are certain metrics reported such as % of time in low, % of time in high, average, HbA1c calculation, etc. Since I upgraded to v5.1.5 those numbers seem to be wrong all the time (at least the %low, high and In Range. Here are a couple of examples from the last few days:

IMG_1365 IMG_1378

As you can see, in the first image, when I chose "Today", the chart and the percentages are way off. Since midnight I've been in range all the time, but the stats show that I've been 66% of the time high. The second screenshot, also from today shows something similar. even though all the time in range, it shows 6% high.

I'm not sure how to preperly calculate the other 3 stats (Average, HbA1c anc CV) to see if they are right or also wrong...

In addition to that (although this might be a different issue to be created), I'm not sure who updated the translations for Spanish, but "In Range" has changed to "Estrecho", and that makes absolutely no sense. It should be changed back to whatever it was before (I'm assuming we had something like "En Rango" but cannot remember).

OliNix commented 2 months ago

This is working correctly.

Please note the number at the bottom of the screen in the KPI section next to low (<60) and high (>140).

However, your chart is set to show low as <70 and high as >180. This is the reason for the disconnect.

Please go to "Settings > Statistics > Time in Range Type" and set this to "User Range".

image image

Your KPI metrics should then match your chart display.

paulplant commented 2 months ago

In addition to that (although this might be a different issue to be created), I'm not sure who updated the translations for Spanish, but "In Range" has changed to "Estrecho", and that makes absolutely no sense. It should be changed back to whatever it was before (I'm assuming we had something like "En Rango" but cannot remember).

I translated them so there is a good chance as I usually make mistakes :)

But in this case, it is working correctly. We made changes back in December 2023 to add new calculation methods:

https://github.com/JohanDegraeve/xdripswift/releases/tag/5.0.0

So now there are 3 calculation types:

https://diatribe.org/time-tight-range-new-diabetes-goal

As @OliNix says, you can choose which calculation you want to use in the Settings screen, or you can just double-tap the "In Range" label and it will cycle through them directly from the Home Screen and dynamically update all calculations.

@sergiotome , please confirm and close the issue if you agree. 👍

paulplant commented 2 months ago

Closing...