Device event subType: reservoirChange

Jump to...(notable fields on this type)

NB: All fields are required unless otherwise noted.

Jump to example JSON:

type

[ingestion, storage, client] The string deviceEvent.

QUICK SUMMARY
Required:
    jellyfish: yes
    platform: yes

subType

[ingestion, storage, client] The string reservoirChange.

QUICK SUMMARY
Required:
    jellyfish: yes
    platform: yes

A reservoirChange event represents any event in an insulin delivery system that implies a return to a device state not yet ready to deliver insulin. This varies depending on the type of insulin delivery device. For conventional insulin pumps with syringe-like reservoirs, this will be a rewind event. For an Insulet OmniPod system, it is a pod deactivation event.

This event often implies a suspension of insulin delivery; in the case that the device data includes an event that fits into this reservoirChange data model but does not include a separate indication of insulin delivery suspension, a status event should also be uploaded to the platform to record the suspension of insulin delivery and should be included (in its entirety) in the status field.

The optional payload embedded object may be included in order to expose the specifics of the event type that is being interpreted more generally as a reservoirChange, along with any other device-specific information that may be desirable for auditing user and device behavior and performance.


status

This field is optional.

[ingestion] The status event logically connected with this event, or—for the legacy jellyfish data ingestion service only—optionally the id of the status event instead of the event itself.

[storage, client] The id of the status event logically connected with this event.

QUICK SUMMARY
Required:
    jellyfish: no (optional)
    platform: no (optional)

As mentioned above, a reservoirChange event implies a stoppage of insulin delivery. On some insulin delivery devices, the data includes an explicit indication of this suspended state, but on devices where the event interpreted as a reservoirChange (whether that's a rewind of a syringe-style pump or a pod deactivation in the case of a patch-style pump, etc.) is the only event yielding information regarding the pump's insulin delivery status, a status event should be fabricated using the relevant information from the reservoirChange event (timestamp, log index, etc.) and embedded within the reservoirChange event in order to provide an audit trail of the user's data and preserve the close connection between the stored events.

See linking events for additional details regarding inter-event linking in the Tidepool platform.


clockDriftOffset

See common fields.


conversionOffset

See common fields.


deviceId

See common fields.


deviceTime

See common fields.


time

See common fields.


timezoneOffset

See common fields.


uploadId

See common fields.


_active

See common fields.


_groupId

See common fields.


_schemaVersion

See common fields.


_version

See common fields.


createdTime

See common fields.


guid

See common fields.


id

See common fields.


example (client)

{
    "type": "deviceEvent",
    "subType": "reservoirChange",
    "status": "921bab64eb1a492ca8af11ab4f24a832",
    "clockDriftOffset": 0,
    "conversionOffset": 0,
    "deviceId": "DevId0987654321",
    "deviceTime": "2016-06-13T19:22:56",
    "guid": "14ac812f-96f2-45e6-9a20-aa5d6d8acd26",
    "id": "d14ed2262335498193154dbebf3ed0a7",
    "time": "2016-06-14T02:22:56.459Z",
    "timezoneOffset": -420,
    "uploadId": "SampleUploadId"
}

example (ingestion)

{
    "type": "deviceEvent",
    "subType": "reservoirChange",
    "status": {
        "type": "deviceEvent",
        "subType": "status",
        "status": "suspended",
        "duration": 30600000,
        "expectedDuration": 36720000,
        "reason": {
            "suspended": "automatic",
            "resumed": "automatic"
        },
        "clockDriftOffset": 0,
        "conversionOffset": 0,
        "deviceId": "DevId0987654321",
        "deviceTime": "2016-06-13T19:22:56",
        "time": "2016-06-14T02:22:56.461Z",
        "timezoneOffset": -420,
        "uploadId": "SampleUploadId"
    },
    "clockDriftOffset": 0,
    "conversionOffset": 0,
    "deviceId": "DevId0987654321",
    "deviceTime": "2016-06-13T19:22:56",
    "time": "2016-06-14T02:22:56.460Z",
    "timezoneOffset": -420,
    "uploadId": "SampleUploadId"
}

example (storage)

{
    "type": "deviceEvent",
    "subType": "reservoirChange",
    "status": "fe26e772de0b4472919349c12820fda4",
    "_active": true,
    "_groupId": "abcdef",
    "_schemaVersion": 0,
    "_version": 0,
    "clockDriftOffset": 0,
    "conversionOffset": 0,
    "createdTime": "2016-06-14T02:23:01.461Z",
    "deviceId": "DevId0987654321",
    "deviceTime": "2016-06-13T19:22:56",
    "guid": "fa849fa5-6ece-43a0-a7b1-2aadbfab469a",
    "id": "4b8be50c2d5d441399c7495128231f97",
    "time": "2016-06-14T02:22:56.461Z",
    "timezoneOffset": -420,
    "uploadId": "SampleUploadId"
}