Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgdl -> mg/dl #3423

Merged
merged 1 commit into from
Jan 1, 2020
Merged

mgdl -> mg/dl #3423

merged 1 commit into from
Jan 1, 2020

Conversation

AdrianLxM
Copy link
Contributor

Nighscout according to @MilosKozak and from what it sends to AndroidAPS uses "mg/dl", not "mgdl"

@PieterGit
Copy link
Contributor

@AdrianLxM : the code uses mgdl for mg/dL and mmol for mmol/L. So this PR will currently break the units setting. Can you change it so that it is clear that you should use mgdl or mmol, but that the units are mg/dL and mmol/L.

Note that liter is often abbreviated with a capital L, to avoid confusion with a 1 or l.

See https://github.com/nightscout/cgm-remote-monitor/search?utf8=%E2%9C%93&q=units+mgdl+mmol&type= for occurences of the unit in the current code.

@PieterGit PieterGit added the docs label Mar 9, 2018
@PieterGit PieterGit added this to the 0.10.3 milestone Mar 9, 2018
@@ -483,7 +483,7 @@ To learn more about the Nightscout API, visit https://YOUR-SITE.com/api-docs.htm
Treatment Profile Fields:

* `timezone` (Time Zone) - time zone local to the patient. *Should be set.*
* `units` (Profile Units) - blood glucose units used in the profile, either "mgdl" or "mmol"
* `units` (Profile Units) - blood glucose units used in the profile, either "mg/dl" or "mmol"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like. Use mgdl for mg/dL and use mmol for mmol/L

@AdrianLxM
Copy link
Contributor Author

The profiles created by NightScout use "mg/dl" and "mmol". This is why AndroidAPS checks for them.
Having "mgdl" and "mmol" in the documentation lead to the problem that the 600series uploader uploaded "mgdl" and was not detected.

Storing the profile again from Nightscout leads to the correct (?) "mg/dl" that will be detected correctly.

@AdrianLxM
Copy link
Contributor Author

An example from the tests where units is set to "mg/dl":

.send({eventType: 'Meal Bolus', carbs: '30', insulin: '2.00', preBolus: '15', glucose: 100, glucoseType: 'Finger', units: 'mg/dl'})

So it seems that like with the display units, the internal representation is "mg/dl" and "mmol".

@AdrianLxM
Copy link
Contributor Author

Any news to this?
Using "mgdl" now after years of using "mg/dl" would break many apps working with NightScout. This is why I suggest only updating the documentation.

@sulkaharo
Copy link
Member

Nightscout code uses "mgdl" for the internal representation and for interpreting this variable, so if we change the documentation, we need to change multiple parts in the logic to understand both formats. The user-facing presentation uses "mg/dl". What's the specific API that AndroidAPS uses that sees "mg/dl"?

@PieterGit
Copy link
Contributor

@AdrianLxM can you have a look at @sulkaharo question above. If not answered, I think I'll postpone this to Nightscout 0.11 as it's not clear of what that best way is to fix this for both Nightscout and AndroidAPS

@PieterGit PieterGit modified the milestones: 0.10.3, 0.11.0 Jul 8, 2018
@PieterGit
Copy link
Contributor

@AdrianLxM Postponed this to 0.11.0 because we're about to release a new version and this change probably needs more thought. Please have a look at my question of two weeks ago and drop in at https://gitter.im/nightscout/public to discuss this

@PieterGit
Copy link
Contributor

@AdrianLxM and @MilosKozak : can we close this PR or does is there anything we can do know to resolve it?

@PieterGit
Copy link
Contributor

@AdrianLxM and @MilosKozak last call for this PR. If there is no response soon I'll close this due to inactivity. Postponing this to 0.12 release for now.

@sulkaharo question of May 18th has not been answered, see #3423 (comment)

@PieterGit PieterGit modified the milestones: 0.11.0, 0.12.0 Oct 24, 2018
@AdrianLxM
Copy link
Contributor Author

I neither use Nightscout at the moment nor the 600 Series Uploader.

Back when I reported that either the behavior of NS or the documentation was wrong as they didn't fit.

@sulkaharo sulkaharo merged commit 78be0f6 into nightscout:dev Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants