Bolus subType: square
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 bolus
.
QUICK SUMMARY
Required:
jellyfish: yes
platform: yes
subType
[ingestion, storage, client] The string square
.
QUICK SUMMARY
Required:
jellyfish: yes
platform: yes
Changelog for subType
_schemaVersion
? (future): We plan to migrate from square
to extended
in the future.
This is the sub-type of bolus
event that represents a bolus insulin dose programmed to be delivered spread evenly over a duration
of time (typically fifteen minutes to several hours).
We plan to migrate all Tidepool data to use extended
as the value of this sub-type rather than square
in order to improve the consistency of the data model. With subType
containing extended
and the extended
field containing the value of the delivered insulin dose, this sub-type of bolus
event will be parallel to normal
boluses, where the subType
is normal
and the normal
field contains the value of the delivered insulin dose.
extended
[ingestion, storage, client] A floating point value representing units of insulin.
QUICK SUMMARY
Required:
jellyfish: yes
platform: yes
Numerical type: Floating point value rounded to the appropriate significant figures for the device's precision.
Range:
min: >= 0.0
max: 100.0
The extended
field encodes the numerical value of the dose of insulin delivered over the duration
by an insulin pump. As with normal
boluses, we do not allow the upload of boluses with a total delivered dose of 0 units.
Refer to the documentation for normal
boluses for an explanation of the range of this field.
expectedExtended
This field is optional.
[ingestion, storage, client] A floating point value representing units of insulin.
QUICK SUMMARY
Required:
jellyfish: no (optional)
platform: no (optional)
Numerical type: Floating point value rounded to the appropriate significant figures for the device's precision.
Range:
min: > `extended`
max: 100.0
When a square
bolus is interrupted (for example, by an occlusion or pump malfunction) or canceled by the user, the expectedExtended
field is used to store the original value of the dose of insulin that the user programmed, while extended
represents the value of the dose that was actually delivered.
Refer to the documentation for normal
boluses for an explanation of the range of this field.
duration
[ingestion, storage, client] An integer value representing a duration of time in milliseconds.
QUICK SUMMARY
Required:
jellyfish: yes
platform: yes
Numerical type: Integer value representing milliseconds.
Range:
min: 0
max: 86400000
The duration
field encodes the actual elapsed duration of time, in milliseconds, spent delivering the dose of insulin encoded in extended
.
The user interface for some insulin pumps allows a user to program a square
bolus with a 0 duration; this is logically equivalent to a normal
bolus but in order to expose device data with the highest level of fidelity possible, we preserve the record as a sub-type square
and allow the upload of the event with a value of 0 for duration
.
To the best of our knowledge, no insulin pump allows the programming of a square
bolus with a duration longer than twenty-four hours, and so we have chosen this as the maximum value accepted by the new platform APIs.
expectedDuration
This field is optional.
[ingestion, storage, client] An integer value representing an original programmed duration of time in milliseconds when the programmed event did not complete due to interruption or user cancellation.
QUICK SUMMARY
Required:
jellyfish: no (optional)
platform: no (optional)
Numerical type: Integer value representing milliseconds.
Range:
min: >= `duration`
max: 86400000
When a square
bolus is interrupted (for example, by an occlusion or pump malfunction) or canceled by the user, the expectedDuration
field is used to store the original duration of time that the user programmed for delivery of the dose of insulin encoded in extended
. The duration
field, in contrast, encodes the actual elapsed duration of dose delivery.
The minimum value of expectedDuration
is any value greater than or equal to that encoded under duration
since any other value (i.e., less than duration
) cannot obtain from interruption or cancellation of a bolus. Note that the expectedDuration
can only be equal to the duration
in the very rare and special case that the duration
is 0. See above under duration
for discussion of the minimum and maximum values for this field.
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": "bolus",
"subType": "square",
"extended": 9.75,
"expectedExtended": 14.625,
"duration": 3600000,
"expectedDuration": 5400000,
"clockDriftOffset": 0,
"conversionOffset": 0,
"deviceId": "DevId0987654321",
"deviceTime": "2018-05-14T18:17:06",
"guid": "05934ef2-230c-42cb-bebc-e2163462dbf7",
"id": "5753389d95f842c283de92bb85ca43cf",
"time": "2018-05-14T08:17:06.859Z",
"timezoneOffset": 600,
"uploadId": "SampleUploadId"
}
example (ingestion)
{
"type": "bolus",
"subType": "square",
"extended": 8.25,
"expectedExtended": 12.375,
"duration": 25200000,
"expectedDuration": 37800000,
"clockDriftOffset": 0,
"conversionOffset": 0,
"deviceId": "DevId0987654321",
"deviceTime": "2018-05-14T18:17:06",
"time": "2018-05-14T08:17:06.860Z",
"timezoneOffset": 600,
"uploadId": "SampleUploadId"
}
example (storage)
{
"type": "bolus",
"subType": "square",
"extended": 6,
"expectedExtended": 9,
"duration": 23400000,
"expectedDuration": 35100000,
"_active": true,
"_groupId": "abcdef",
"_schemaVersion": 0,
"_version": 0,
"clockDriftOffset": 0,
"conversionOffset": 0,
"createdTime": "2018-05-14T08:17:11.860Z",
"deviceId": "DevId0987654321",
"deviceTime": "2018-05-14T18:17:06",
"guid": "23f71af0-f30b-4348-88f6-4169bd46ffcb",
"id": "b862128865b34aabad71d02389717579",
"time": "2018-05-14T08:17:06.860Z",
"timezoneOffset": 600,
"uploadId": "SampleUploadId"
}