LOOP-1361 Capture manually entered BG reading#10
Conversation
- https://tidepool.atlassian.net/browse/LOOP-1361 - Use TSMBGDatum type if glucose is user entered
rickpasetto
left a comment
There was a problem hiding this comment.
So, I'm not sure what a TSMBGDatum is, but seems legit.
👍
|
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). |
nhamming
left a comment
There was a problem hiding this comment.
Concern about the need for this code (but I'm probably lacking scope).
| 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Basal rate fixes, and tests passing.
Requesting any 2 reviewers, please.