-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Overview
Loop adds Minimed pump events to DoseStore, converting them to DoseEntry types along the way.
With this commit we started treating rewind-prime windows as suspend-resume doses.
It also introduced a bug, in that a resume is never created unless it appears in the same sequence of pump events being analyzed as the rewind; the rewind has no such logic and is always translated to a suspend.
Risks
IOB is under-estimated when pump events are missing, also resulting in over-estimating ICE. The former can lead to over-delivery in bolus and basal recommendations. The latter has somewhat of the opposite effect, but isn't easily quantified.
Detecting the issue
There's a number of ways the issue manifests:
- HealthKit will show no basal insulin (basals aren't saved until its understood how long the suspend window was)
- Loop's dose chart (when rendering pump events, not reservoir changes) shows continuous suspends
- The issue report (under normalized dose entries) is devoid of basal doses, and there's a final suspend appended to the end of the list:
* DoseEntry(type: LoopKit.DoseType.tempBasal, startDate: 2018-05-15 14:05:29 +0000, endDate: 2018-05-15 14:10:29 +0000, value: 2.9249999999999998, unit: LoopKit.DoseUnit.unitsPerHour, description: nil, syncIdentifier: Optional("16015d45074f12"), scheduledBasalRate: Optional(0.85 IU/hr))
* DoseEntry(type: LoopKit.DoseType.basal, startDate: 2018-05-15 14:10:29 +0000, endDate: 2018-05-15 14:21:33 +0000, value: 0.84999999999999998, unit: LoopKit.DoseUnit.unitsPerHour, description: nil, syncIdentifier: Optional("7b025d4a070f120e2200"), scheduledBasalRate: nil)
* DoseEntry(type: LoopKit.DoseType.bolus, startDate: 2018-05-15 14:56:00 +0000, endDate: 2018-05-15 14:56:00 +0000, value: 4.0, unit: LoopKit.DoseUnit.units, description: nil, syncIdentifier: Optional("0100a000a00000004078274f12"), scheduledBasalRate: nil)
* DoseEntry(type: LoopKit.DoseType.bolus, startDate: 2018-05-15 17:13:21 +0000, endDate: 2018-05-15 17:13:21 +0000, value: 2.8500000000000001, unit: LoopKit.DoseUnit.units, description: nil, syncIdentifier: Optional("0100720072003600554d2a4f12"), scheduledBasalRate: nil)
* DoseEntry(type: LoopKit.DoseType.bolus, startDate: 2018-05-15 19:20:29 +0000, endDate: 2018-05-15 19:20:29 +0000, value: 2.0, unit: LoopKit.DoseUnit.units, description: nil, syncIdentifier: Optional("0100500050002e005d542c4f12"), scheduledBasalRate: nil)
* DoseEntry(type: LoopKit.DoseType.bolus, startDate: 2018-05-15 21:59:55 +0000, endDate: 2018-05-15 21:59:55 +0000, value: 2.0, unit: LoopKit.DoseUnit.units, description: nil, syncIdentifier: Optional("0100500050001300777b2e4f12"), scheduledBasalRate: nil)
* DoseEntry(type: LoopKit.DoseType.bolus, startDate: 2018-05-15 23:00:58 +0000, endDate: 2018-05-15 23:00:58 +0000, value: 1.3999999999999999, unit: LoopKit.DoseUnit.units, description: nil, syncIdentifier: Optional("01003800380045007a40304f12"), scheduledBasalRate: nil)
* DoseEntry(type: LoopKit.DoseType.bolus, startDate: 2018-05-16 00:35:04 +0000, endDate: 2018-05-16 00:35:04 +0000, value: 3.0, unit: LoopKit.DoseUnit.units, description: nil, syncIdentifier: Optional("01007800780036004463314f12"), scheduledBasalRate: nil)
* DoseEntry(type: LoopKit.DoseType.bolus, startDate: 2018-05-16 01:42:45 +0000, endDate: 2018-05-16 01:42:45 +0000, value: 1.6499999999999999, unit: LoopKit.DoseUnit.units, description: nil, syncIdentifier: Optional("0100420042006e006d6a324f12"), scheduledBasalRate: nil)
* DoseEntry(type: LoopKit.DoseType.bolus, startDate: 2018-05-16 01:52:21 +0000, endDate: 2018-05-16 01:52:21 +0000, value: 2.0, unit: LoopKit.DoseUnit.units, description: nil, syncIdentifier: Optional("010050005000a3005574324f12"), scheduledBasalRate: nil)
* DoseEntry(type: LoopKit.DoseType.suspend, startDate: 2018-05-15 14:21:33 +0000, endDate: 2018-05-15 14:21:33 +0000, value: 0.0, unit: LoopKit.DoseUnit.unitsPerHour, description: nil, syncIdentifier: Optional("21006155070f12"), scheduledBasalRate: Optional(0.85 IU/hr))Metadata
Metadata
Assignees
Labels
No labels