Skip to content

LOOP-1361 Capture manually entered BG reading#10

Merged
darinkrauss merged 1 commit into
devfrom
darinkrauss/LOOP-1361/manual-glucose
Jun 15, 2020
Merged

LOOP-1361 Capture manually entered BG reading#10
darinkrauss merged 1 commit into
devfrom
darinkrauss/LOOP-1361/manual-glucose

Conversation

@darinkrauss
Copy link
Copy Markdown
Contributor

Requesting any 2 reviewers, please.

Copy link
Copy Markdown
Contributor

@rickpasetto rickpasetto left a comment

Choose a reason for hiding this comment

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

So, I'm not sure what a TSMBGDatum is, but seems legit.
👍

@darinkrauss
Copy link
Copy Markdown
Contributor Author

SMBGDatum stands for "Self Monitor Blood Glucose Datum" (i.e. user manual) and CBGDatum stands for "Continuous Blood Glucose Datum" (i.e. device). This is per the Tidepool Data Model (backend).

Copy link
Copy Markdown
Contributor

@nhamming nhamming left a comment

Choose a reason for hiding this comment

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

Concern about the need for this code (but I'm probably lacking scope).

Comment on lines 15 to +17
return TCalibrationDeviceEventDatum(time: datumTime, value: datumValue, units: datumUnits).adorn(withOrigin: datumOrigin)
} else if wasUserEntered {
return TSMBGDatum(time: datumTime, value: datumValue, units: datumUnits, subType: .manual).adorn(withOrigin: datumOrigin)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hm... will this work? Often isDisplayOnly is set when wasUserEntered is set, unless I missed something in the previous PRs. I mean, I have yet to see a case where only wasUserEntered is set.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Loop will soon support manually entered glucose values for use during a bolus when CGM readings are not available for some reason. This glucose value will be non-calibration (isDisplayOnly=false) user-entered (wasUserEntered=true). This is the internal implementation and the UI will be implemented with https://tidepool.atlassian.net/browse/LOOP-906.

@darinkrauss darinkrauss requested a review from nhamming June 15, 2020 16:29
Copy link
Copy Markdown
Contributor

@ps2 ps2 left a comment

Choose a reason for hiding this comment

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

LGTM

@darinkrauss darinkrauss merged commit c7aac3c into dev Jun 15, 2020
@darinkrauss darinkrauss deleted the darinkrauss/LOOP-1361/manual-glucose branch June 15, 2020 18:50
ps2 added a commit that referenced this pull request Apr 21, 2023
Basal rate fixes, and tests passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants