Skip to content

Loop can skip/miss Manual Boluses resulting in incorrect IoB #853

@shanselman

Description

@shanselman

Describe the bug

I took 5U AT 10:05am manually via audio bolus. The manual bolus shows up in my pump history and Loop sees it in Event History (see pic.) I RARELY bolus this way so I am not sure what the expected behavior is. I would personally expect Loop to see the bolus in history and have it show up as IoB.

I am on 1.9.4dev so I’m feeling this may be related to the “Loop stores insulin in HealthKit” path? Perhaps it’s using HealthKit as the authoritative source and not seeing the Bolus?

It feels like if Loop misses a manual Bolus (perhaps while the bolus is long running?) and then Loop temp basals and records that temp to HealthKit that it won’t look back in Event History and see the previous manual bolus.

UPDATE: I went into HealthKit and manually deleted Insulin Delivery Record’s going back until 10am, then force quit Loop. Loop then recovered and populated IoB correctly. This was an interesting bug/issue as because Loop thought I had no IoB it had Temp Basaled me to 3U/hr which would have been a problem later.

Attach an Issue Report

Attached Loop Report 2018-12-12 11_00_24-08_00.zip

To Reproduce
Guessing here, will try to repro again. Steps to reproduce the behavior:

  1. Enable Loop to log Insulin in HealthKit
  2. Largeish manual bolus
  3. Loop loops and temp basals shortly after bolus.
  4. Loop misses manual loop. Should show manual bolus as IoB but doesn't.

Expected behavior
I'd expect loop to look back n number of events in case it missed a manual bolus, rather than using (?) HealthKit as the authoritative source.

Screenshots
Note the bolus around 10:05am
img_2846
Bolus recorded here at 10:05am
img_2847
Bolus missing from HealthKit. Instead a 1.05U basal is present? Then follow up basals.
img_2848
Note missing basal
img_2849

Phone

  • Hardware: iPhone XS Max
  • OS Version: 12.1.1 (16C50)

Loop Version

  • Version Number: 1.9.4
  • Repo: LoopKit/dev

CGM

  • Device: Dexcom G5
  • Manager app: Dexcom App

Pump

  • Manufacturer: Medtronic
  • Model: 522
  • Firmware version: 2.4a 1.1 0B 0B

Additional context
I was having a considerable low at the time and Loop had me temped at 0. I was taking the 5U in anticipation of a very large lunch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions