tidepool-org/mmcsv-carelink-data — pull request #17 by bewest (2014-02-24 23:17:57+00:00)
Title: Bewest/bolus subtypes

## Experiment with bolus subtypes

As discussed here: https://github.com/tidepool-org/data-model/pull/12/files#r10009973

```
{
"initialDelivery": 3.6,
"extendedDelivery": 1.7,
"value": 5.3,
"recommended": ???,
"deviceTime": "time1",
"duration": 14400000,
"extended": true,
"type": "bolus",
"id": "19bbfa82-7ee8-4f5c-a8c7-d3b9821aece3"
}
```

Will actually be.

```
{
"value": 3.6,
"deviceTime": "time1",
"joinKey": "myJoinKey",
"type": "bolus",
“subType”: “dual/normal”
}
{
"value": 1.7,
"deviceTime": "time1",
"duration": 14400000,
"joinKey": "myJoinKey"
"type": "bolus",
“subType”: “dual/square”
}
```

The "myJoinKey" is actually some unique (per-user) key that tells us that we can combine the records together. A proposal for how to generate it on medtronic data is to use:

```
myJoinKey = f(record_timestamp, carelink_raw_id) // for first bolus or wizard, or whatever works
```