example - bolus calculator (Pump_Extended)

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_EXTENDED Manually changed recommended bolus 7 IU =
(meal correction : 0 IU
+ BG correction : 7 IU)
6 IU =
(meal correction : 0 IU
+ BG correction : 6 IU)
6 IU =
(meal correction : 0 IU
+ BG correction : 6 IU)
6 IU 1200000 ms - BG - 170mg/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_EXTENDED, activation type = Manually changed recommended bolus.

MedicationAdministration resource containing the confirmed bolus and the details of the dose delivery type = PUMP_EXTENDED

MedicationRequest Sample :

{
	"resourceType": "MedicationRequest",
	"id": "9cd7738b-10be-42d4-9961-e93f04fa70ec",
	"meta": {
		"profile": [
			"http://roche.com/fhir/iop/StructureDefinition/MedicationRequest"
		]
	},
	"status": "active",
	"intent": "789480007_manually_changed_recommended_bolus", // 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": [  // Bolus delivery type
					{
						"system": "http://roche.com/fhir/iop/cs",
						"code": "789480007_bolus_extended",
						"display": "789480007_bolus_extended"
					}
				]
			},
			"doseAndRate": [
				{
					"type": {
						"coding": [
							{
								"system": "http://roche.com/fhir/iop/cs",
								"code": "789480007_correction_bolus_recommended",
								"display": "789480007_correction_bolus_recommended"
							}
						]
					},
					"doseQuantity": {
						"value": 7,
						"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": "advice-total-component-recommended",
								"display": "advice-total-component-recommended"
							}
						]
					},
					"doseQuantity": {
						"value": 7,
						"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": 6,
						"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": 6,
						"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": 6,
						"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": 6,
						"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 (Bolus calculator Sample) having reference to MedicationRequest profile :

{
   "resourceType": "MedicationAdministration", // Resource name value in FHIR for this profile
	"id": "9a9adc4f-c401-4af3-93f6-c8b237b1f771",
	  "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_extended",
								"display": "789480007_bolus_extended"
							}
						]
					}
				],
	"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-12-28T:00+00:00",
                    "end": "2020-12-28T:00+00:00"
                },
	"performer": [{
		"actor": {
			 "reference" : {
        "reference" : "Device/5f0990b9-1be2-4f69-9621-028b6abdf1b5",
      }
		}
	}],
    "request": {
		"reference": "MedicationRequest/9cd7738b-10be-42d4-9961-e93f04fa70ec"
	},
	"dosage": { //confirmed bolus total
		"dose": {
			"value": "6.0",
			"unit": "[iU]",
			"system": "http://unitsofmeasure.org",
			"code": "[iU]"
		}
	},
	"contained": [
	{
   "resourceType": "MedicationAdministration", // Resource name value in FHIR for this profile
	"id": "1b2aad89-0c53-49c0-b415-0c759b658dcc",
	  "meta": { // used for validation of the profile
		"profile": [
		"http://roche.com/fhir/iop/StructureDefinition/MedicationAdministration"
		]
	},
	"partOf": [
          {
            "reference": "MedicationAdministration/9a9adc4f-c401-4af3-93f6-c8b237b1f771"
          }
        ], 
	"status": "completed", // FHIR hardcorded value for status
	"medication" : { // code for type of medication
    "concept" : {
      "coding" : [
			{
			"system": "http://snomed.info/sct",
			"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/9cd7738b-10be-42d4-9961-e93f04fa70ec"
	},
	"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"
  }
}