Loop icon indicating copy to clipboard operation
Loop copied to clipboard

Tidepool Service plugin does not upload non-pump insulin to Tidepool web site

Open Trpl7ca opened this issue 2 years ago • 21 comments

Tidepool Service does not load manual insulin entries to its web site. Non-pump entries show up in NS but not in Tidepool. This of course makes total insulin values invalid Loop Report 2023-07-13 10:37:30-07:00.md

To Reproduce Select insulin delivery, non-pump Insulin and enter a value. Check later if it show on Tidepool Web site Expected behavior Expect the value to show up on the web site as it does in NS Screenshots

Phone

  • Hardware: Iphone 13 pro
  • OS Version: IOS 16.5.1

Loop Version

  • Version Number:3.3.0
  • Repo: dev workspace c60e550

CGM

  • Device: Dexcom G6
  • Manager app: Phone Dexcom app

Pump

  • Manufacturer: Dash
  • Model:
  • Firmware version: 1.4.0

Additional context Add any other context about the problem here.

Trpl7ca avatar Jul 13 '23 17:07 Trpl7ca

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Aug 13 '23 02:08 github-actions[bot]

I will do a test to see if this is still true.

marionbarker avatar Aug 13 '23 03:08 marionbarker

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Sep 13 '23 02:09 github-actions[bot]

I confirm this is still a problem. On 9/11 I took 5 units non-pump insulin. My Apple Health TDD is close to 5 units more than my Tidepool TDD. Apple Health = 40.85 U Tidepool = 36.2 U On days with no non pump insulin they are pretty close.

marionbarker avatar Sep 13 '23 04:09 marionbarker

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 15 '23 02:10 github-actions[bot]

This should stay open.

marionbarker avatar Oct 15 '23 02:10 marionbarker

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Nov 15 '23 02:11 github-actions[bot]

Bump.

marionbarker avatar Nov 15 '23 04:11 marionbarker

This spreadsheet compares reported values in Apple Health, Tidepool and Nightscout.

In addition to the Tidepool website not including the non-pump insulin, both remote services do not agree with Apple Health regarding daily basal. I will open a separate issue for the basal discrepancy (see #2095).

Remote and AH Records

The build commit is: 6b7bba6, running on an iOS 17.1.1 phone using DASH, G6, uploading to Tidepool and Nightscout from Loop

marionbarker avatar Nov 16 '23 00:11 marionbarker

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Dec 17 '23 02:12 github-actions[bot]

Bump

marionbarker avatar Dec 17 '23 03:12 marionbarker

I repeated the test again. I confirm the bolus amount uploaded from Loop to Tidepool (and Nightscout) is correct with the following exception:

  • Tidepool does not get non-pump insulin

Please see Issue #2095 which discusses comparison of remote upload of basal rates to both Tidepool and Nightscout. This issue also has a link to a spreadsheet with detailed comparisons across Apple Health, Tidepool, Nightscout and the amount of insulin delivered as reported by the pod. This spreadsheet confirms the statement about bolus records.

marionbarker avatar Jan 08 '24 16:01 marionbarker

This is working as designed as the Tidepool platform does not have a concept of non-pump insulin. A PwD would need to separately upload this data via a supported device or Tidepool would need to modify the platform to accept this kind of data.

loudestnoise avatar Jan 08 '24 17:01 loudestnoise

Is Tidepool considering a modification? As it stands now the values shown on Tidepool are inaccurate if non-pump insulin is used. How is it possible to upload while using Loop or a supported device?

Trpl7ca avatar Jan 08 '24 18:01 Trpl7ca

I checked the timing on this. It was first reported after TidepoolKit was removed from LoopWorkspace as a submodule and instead added as a Package Dependency.

This commit: e118d8f, added this dependency

/* Begin XCRemoteSwiftPackageReference section */
		C124239B2A58771A00EAC89E /* XCRemoteSwiftPackageReference "TidepoolKit" */ = {
			isa = XCRemoteSwiftPackageReference;
			repositoryURL = "https://github.com/tidepool-org/TidepoolKit";
			requirement = {
				branch = dev;
				kind = branch;
			};
		};
/* End XCRemoteSwiftPackageReference section */

The files in the two versions are almost identical. There are some authorization and error message difference with Tidepool compared to the included version in main.

This other difference is unlikely to be a problem, just mentioning it because I went to the trouble of comparing files.

You have to look in the derived data folder for the remote package after opening LoopWorkspace in Xcode. Just listing files that differ (from main) (path relative to TidepoolKit folder):

  • TidepoolKit/TAPI.swift
  • TidepoolKit/TError.swift
  • TidepoolKit/Model/Datum/TDatum.swift
  • TidepoolKit/Model/Datum/BolusDatum/TAutomatedBolusDatum.swift
  • TidepoolKit/Model/Prescription/TPrescriptionClaim.swift
  • TidepoolKit/TEnvironment.swift

I report this one diff, in the unlikely case it is relevant. (< refers to dev, > refers to main):

  • TidepoolKit/Model/Datum/BolusDatum/TAutomatedBolusDatum.swift
18c18,20
<         super.init(.automated, time: time, insulinFormulation: insulinFormulation)
---
>         // PS: Tidepool backend does not currently support automated as a subtype.
>         // And the automated flag should probably be on a separate, orthogonal attribute.
>         super.init(.normal, time: time, insulinFormulation: insulinFormulation)

marionbarker avatar Jan 23 '24 17:01 marionbarker

A possible fix is provided in https://github.com/LoopKit/TidepoolService/pull/21

marionbarker avatar Jan 29 '24 22:01 marionbarker

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Feb 29 '24 02:02 github-actions[bot]

Bump

marionbarker avatar Feb 29 '24 02:02 marionbarker

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Apr 01 '24 02:04 github-actions[bot]

Bump

marionbarker avatar Apr 01 '24 03:04 marionbarker

This is fixed in Loop 3.4. Please close this issue.

marionbarker avatar Sep 20 '24 22:09 marionbarker

This can be closed with the release of 3.4.4.

marionbarker avatar Oct 12 '24 17:10 marionbarker

@Trpl7ca Please close this Issue by scrolling to the bottom of the screen at GitHub and tapping on "Close issue"

BR/Marion

marionbarker avatar Mar 14 '25 19:03 marionbarker