example - bolus calculator (Pump_Multiwave)

Sample scenario

Bolus delivery type Bolus Activation type Recommended total
bolus
Selected total
bolus
Confirmed total bolus extended,
/delayed
bolus

extended/
delayed
duration
immediate
bolus
BG/Carb
used for
Bolus
calculation
PUMP_MULTIWAVE Manually changed recommended bolus 6 IU =
(meal correction : 0 IU
+ BG correction : 6 IU
8 IU =
(meal correction : 0 IU
+ BG correction : 8 IU
8 IU =
(meal correction : 0 IU
+ BG correction : IU
6 IU 1200000 ms 2 IU BG - 170 mg/dL
Carb - 10g

MedicationRequest resource containing primarily the Bolus calculation outcome (recommended, selected and confirmed boluses) and the details of the dose like delivery type = PUMP_MULTIWAVE, activation type = Manually changed recommended bolus.

MedicationAdministration resource containing the confirmed bolus and the details of the dose like delivery type = PUMP_MULTIWAVE, activation type = Manually changed recommended bolus.

MedicationRequest Sample :

{
	"resourceType": "MedicationRequest",
	"id": "13f0823f-d3d8-40c2-9155-10e098a48b0f",
	"meta": {
		"profile": [
			"http://roche.com/fhir/iop/StructureDefinition/MedicationRequest"
		]
	},
	"status": "active",
	"intent": "789480007_manually_changed_recommended_bolus", // Activation type
	"medication": {
		"concept": {
			"coding": [
				{
					"system": "http://roche.com/fhir/iop/cs",
					"code": "67866001_short_acting",
					"display": "67866001_short_acting"
				}
			]
		}
	},
	"subject": {
		"reference": "Patient/34605fdc-74aa-4587-a5f0-92e6c5f64527"
	},
	"authoredOn": "2020-02-27T11:14:00+00:00",
	"performer": [
		{
			"reference": "Device/5f0990b9-1be2-4f69-9621-028b6abdf1b5"
		}
	],
	"reason": [
		{
			"reference": "Observation/8u4efa51-f023-4623-b007-6c31dec0d766"
		}
	],
	"dosageInstruction": [
		{
			"method": {
				"coding": [ // Delivery type
					{
						"system": "http://roche.com/fhir/iop/cs",
						"code": "789480007_bolus_multiwave",
                        "display": "789480007_bolus_multiwave"
					}
				]
			},
			"doseAndRate": [
				{
					"type": {
						"coding": [
							{
								"system": "http://roche.com/fhir/iop/cs",
								"code": "789480007_correction_bolus_recommended",
								"display": "789480007_correction_bolus_recommended"
							}
						]
					},
					"doseQuantity": {
						"value": 6,
						"unit": "[iU]",
						"system": "http://unitsofmeasure.org",
						"code": "[iU]"
					}
				},
				{
					"type": {
						"coding": [
							{
								"system": "http://roche.com/fhir/iop/cs",
								"code": "789480007_meal_bolus_recommended",
								"display": "789480007_meal_bolus_recommended"
							}
						]
					},
					"doseQuantity": {
						"value": 0,
						"unit": "[iU]",
						"system": "http://unitsofmeasure.org",
						"code": "[iU]"
					}
				},
				{
					"type": {
						"coding": [
							{
								"system": "http://roche.com/fhir/iop/cs",
								"code": "789480007_total_bolus_recommended",
								"display": "789480007_total_bolus_recommended"
							}
						]
					},
					"doseQuantity": {
						"value": 6,
						"unit": "[iU]",
						"system": "http://unitsofmeasure.org",
						"code": "[iU]"
					}
				},
				{
					"type": {
						"coding": [
							{
								"system": "http://roche.com/fhir/iop/cs",
								"code": "789480007_correction_bolus_selected",
								"display": "789480007_correction_bolus_selected"
							}
						]
					},
					"doseQuantity": {
						"value": 8,
						"unit": "[iU]",
						"system": "http://unitsofmeasure.org",
						"code": "[iU]"
					}
				},
				{
					"type": {
						"coding": [
							{
								"system": "http://roche.com/fhir/iop/cs",
								"code": "789480007_meal_bolus_selected",
								"display": "789480007_meal_bolus_selected"
							}
						]
					},
					"doseQuantity": {
						"value": 0,
						"unit": "[iU]",
						"system": "http://unitsofmeasure.org",
						"code": "[iU]"
					}
				},
				{
					"type": {
						"coding": [
							{
								"system": "http://roche.com/fhir/iop/cs",
								"code": "789480007_total_bolus_selected",
								"display": "789480007_total_bolus_selected"
							}
						]
					},
					"doseQuantity": {
						"value": 8,
						"unit": "[iU]",
						"system": "http://unitsofmeasure.org",
						"code": "[iU]"
					}
				},
				{
					"type": {
						"coding": [
							{
								"system": "http://roche.com/fhir/iop/cs",
								"code": "789480007_correction_bolus_confirmed",
								"display": "789480007_correction_bolus_confirmed"
							}
						]
					},
					"doseQuantity": {
						"value": 8,
						"unit": "[iU]",
						"system": "http://unitsofmeasure.org",
						"code": "[iU]"
					}
				},
				{
					"type": {
						"coding": [
							{
								"system": "http://roche.com/fhir/iop/cs",
								"code": "789480007_meal_bolus_confirmed",
								"display": "789480007_meal_bolus_confirmed"
							}
						]
					},
					"doseQuantity": {
						"value": 0,
						"unit": "[iU]",
						"system": "http://unitsofmeasure.org",
						"code": "[iU]"
					}
				},
				{
					"type": {
						"coding": [
							{
								"system": "http://roche.com/fhir/iop/cs",
								"code": "789480007_total_bolus_confirmed",
								"display": "789480007_total_bolus_confirmed"
							}
						]
					},
					"doseQuantity": {
						"value": 8,
						"unit": "[iU]",
						"system": "http://unitsofmeasure.org",
						"code": "[iU]"
					}
				},
                {
					"type": {
						"coding": [
							{
								"system": "http://roche.com/fhir/iop/cs",
								"code": "789480007_immediate",
								"display": "789480007_immediate"
							}
						]
					},
					"doseQuantity": {
						"value": 2,
						"unit": "[iU]",
						"system": "http://unitsofmeasure.org",
						"code": "[iU]"
					}
				},
				{
					"type": {
						"coding": [
							{
								"system": "http://roche.com/fhir/iop/cs",
								"code": "789480007_delayed",
								"display": "789480007_delayed"
							}
						]
					},
					"doseQuantity": {
						"value": 6,
						"unit": "[iU]",
						"system": "http://unitsofmeasure.org",
						"code": "[iU]"
					}
				},
				{
					"type": {
						"coding": [
							{
								"system": "http://roche.com/fhir/iop/cs",
								"code": "789480007_delayed_duration",
								"display": "789480007_delayed_duration"
							}
						]
					},
					"doseQuantity": {
						"value": 1200000,
						"unit": "ms",
						"system": "http://unitsofmeasure.org",
						"code": "ms"
					}
				}
			]
		}
	]
}


MedicationAdministration Profiles (Bolus calculator Sample) having reference to MedicationRequest profile:

{
	"resourceType": "MedicationAdministration", // Resource name value in FHIR for this profile
	"id": "69456d66-a558-4d4c-8c7a-77e1c2b3b0b6",
	"meta": { // used for validation of the profile
		"profile": [
			"http://roche.com/fhir/iop/StructureDefinition/MedicationAdministration"
		]
	},
	"status": "completed", // FHIR hardcorded value for status
	"category": [
		{
			"coding": [ // Bolus Delivery type
				{
					"system": "http://roche.com/fhir/iop/cs",
					"code": "789480007_bolus_multiwave",
					"display": "789480007_bolus_multiwave"
				}
			]
		}
	],
	"medication": {  // code for type of medication
		"concept": {
			"coding": [
				{
					"system": "http://roche.com/fhir/iop/cs",
					"code": "67866001_short_acting",
					"display": "67866001_short_acting"
				}
			]
		}
	},
	"subject": {
		"reference": "Patient/34605fdc-74aa-4587-a5f0-92e6c5f64527"
	},
	"occurencePeriod": {
                    "start": "2020-02-27T11:14:00+00:00",
                    "end": "2020-02-27T11:34:00+00:00"
                },
	"performer": [
		{
			"actor": {
				"reference": {
					"reference": "Device/5f0990b9-1be2-4f69-9621-028b6abdf1b5"
				}
			}
		}
	],
	"request": {
		"reference": "MedicationRequest/13f0823f-d3d8-40c2-9155-10e098a48b0f"
	},
	"dosage": {
		"dose": {
			"value": "8.0",
			"unit": "[iU]",
			"system": "http://unitsofmeasure.org",
			"code": "[iU]"
		}
	},
	"contained": [
		{
			"resourceType": "MedicationAdministration", // Resource name value in FHIR for this profile
			"id": "5da7938d-c3bb-4d8e-86ac-3b18ae6687e5",
			"meta": { // used for validation of the profile
				"profile": [
					"http://roche.com/fhir/iop/StructureDefinition/MedicationAdministration"
				]
			},
			"partOf": [
				{
					"reference": "MedicationAdministration/69456d66-a558-4d4c-8c7a-77e1c2b3b0b6"
				}
			],
			"status": "completed",
			"medication": {
				"concept": {
					"coding": [
						{
							"system": "http://roche.com/fhir/iop/cs",
							"code": "67866001_short_acting",
							"display": "67866001_short_acting"
						}
					]
				}
			},
			"subject": {
				"reference": "Patient/34605fdc-74aa-4587-a5f0-92e6c5f64527"
			},
			"occurenceDateTime": "2020-02-27T11:14:00+00:00",
			"performer": [
				{
					"actor": {
						"reference": {
							"reference": "Device/5f0990b9-1be2-4f69-9621-028b6abdf1b5"
						}
					}
				}
			],
			"request": {
				"reference": "MedicationRequest/13f0823f-d3d8-40c2-9155-10e098a48b0f"
			},
			"dosage": {
				"method": {
					"coding": [ //Immediate bolus
						{
							"system": "http://roche.com/fhir/iop/cs",
							"code": "789480007_immediate",
							"display": "789480007_immediate"
						}
					]
				},
				"dose": {
					"value": "2.0",
					"unit": "[iU]",
					"system": "http://unitsofmeasure.org",
					"code": "[iU]"
				}
			}
		},
		{
			"resourceType": "MedicationAdministration",
			"id": "d25e76f2-8748-4d97-b7ae-355dba381496",
			"meta": {
				"profile": [
					"http://roche.com/fhir/iop/StructureDefinition/MedicationAdministration"
				]
			},
			"partOf": [
				{
					"reference": "MedicationAdministration/69456d66-a558-4d4c-8c7a-77e1c2b3b0b6"
				}
			],
			"status": "completed",
			"medication": {
				"concept": {
					"coding": [
						{
							"system": "http://roche.com/fhir/iop/cs",
							"code": "67866001_short_acting",
							"display": "67866001_short_acting"
						}
					]
				}
			},
			"subject": {
				"reference": "Patient/34605fdc-74aa-4587-a5f0-92e6c5f64527"
			},
			"occurenceDateTime": "2020-02-27T11:14:00+00:00",
			"performer": [
				{
					"actor": {
						"reference": {
							"reference": "Device/5f0990b9-1be2-4f69-9621-028b6abdf1b5"
						}
					}
				}
			],
			"request": {
				"reference": "MedicationRequest/13f0823f-d3d8-40c2-9155-10e098a48b0f"
			},
			"dosage": {
				"method": {
					"coding": [ //Delayed bolus
						{
							"system": "http://roche.com/fhir/iop/cs",
							"code": "789480007_delayed",
							"display": "789480007_delayed"
						}
					]
				},
				"rateRatio": {
					"numerator": {
						"value": "6.0",
						"unit": "[iU]",
						"system": "http://unitsofmeasure.org",
						"code": "[iU]"
					},
					"denominator": {
						"value": 1200000,
						"unit": "ms",
						"system": "http://unitsofmeasure.org",
						"code": "ms"
					}
				}
			}
		}
	]
}

BG Sample for Capillary Glycemia with Carbs association :

Note : The Guidance Response profile will help the reference of Observation (BG value & its associated carb) with Medication Request profile as a response for bolus calculator usescase.

{
	"resourceType": "Observation",// Resource name value in FHIR for this profile
	"id": "8u4efa51-f023-4623-b007-6c31dec0d766",
	"meta": { // used for validation of the profile
		"profile": [
			"http://roche.com/fhir/iop/StructureDefinition/BG_Observation"
		]
	},
	"status": "final", // FHIR hardcorded value for status
	"code": {
		"coding": [
			{
				"system": "http://loinc.org",
				"code": "32016-8",
				"display": "Glucose [Mass/volume] in Capillary blood" // code for Capillary Glycemia
			}
		]
	},
	"subject": {
		"reference": "Patient/34605fdc-74aa-4587-a5f0-92e6c5f64527"
	},
	"effectiveTiming": {
        "event": "2020-10-14T02:00:00.000+00:00"
    },
	"valueQuantity": {
		"value": 170.0,
		"unit": "mg/dL",
		"system": "http://unitsofmeasure.org",
		"code": "mg/dL"
	},
	"device": {
		"reference": "Device/8954c958-41c5-4a24-82ef-693218c2f625"
	},
	"hasMember": { // Reference to Observation (carbs)
        	"reference": "Observation/78687b6e-291a-45ba-8d0a-b16000b31c71"
      }
}


Carbs Sample :

{
  "resourceType": "Observation", // Resource name value in FHIR for this profile
  "id": "78687b6e-291a-45ba-8d0a-b16000b31c71",
  "meta": { // used for validation of the profile
		"profile": [
			"http://roche.com/fhir/iop/StructureDefinition/Observation"
		]
	},
  "status": "final",  // FHIR hardcorded value for status
  "code": {
    "coding": [
      {
        "system": "http://loinc.org",
        "code": "9059-7",
        "display": "Carbohydrate intake Estimated" // code for carbs
      }
    ]
  },
  "subject": {
    "reference": "Patient/34605fdc-74aa-4587-a5f0-92e6c5f64527"
  },
  "effectiveDateTime": "2017-10-03T06:32:00+01:00",
  "valueQuantity": {
    "value": 10,
    "unit": "g",
    "system": "http://unitsofmeasure.org",
    "code": "g"
  },
  "device": {
    "reference": "Device/8954c958-41c5-4a24-82ef-693218c2f625"
  }
}