---
type: "doc"
source: "source/dosage-examples.html"
---
\[%settitle Dosage Examples%\] \[%file newheader%\] \[%file newnavbar%\] /\* Your special dosage list \*/ ul.ex-struct { margin: 0.5em 0 1em 1.25em; padding: 0; } /\* Ensure each item starts on a new line \*/ ul.ex-struct > li { display: block !important; /\* break onto new line \*/ float: none !important; /\* undo flex or float \*/ clear: both !important; /\* enforce line break \*/ margin: 0.25em 0; /\* spacing between lines \*/ line-height: 1.5; /\* vertical rhythm \*/ color: #111 !important; } /\* Inline code inside those items \*/ ul.ex-struct > li > code { color: #006400 !important; /\* dark green like FHIR's code blocks \*/ background: none !important; /\* remove grey bg \*/ font-weight: 600; white-space: pre; /\* preserve spacing \*/ } <%dtxheader examples Dosage%>
## Dosage Regime Examples
| Responsible Owner: [\[%wgt phx%\]]([%wg phx%]) Work Group | [Standards Status](versions#std-process):[Informative](versions#std-process) |
| --- | --- |
This page presents a series of examples of how to use [DosageDetails](dosage) and related types to represent various complex dosing regimes.
### Note about use of dosage structure
Each of the examples below starts with a textural representation of the dosage. In general, these should be found in the `renderedInstruction` element, but this only shown explicitly in the first example; after that it is omitted for brevity. The examples below include some instances where details in the instruction cannot be represented in the dosage structure.
In regard to these examples, note that the focus here is around the dosage regimes. There is no attempt to populate the rest of the dosage with route, method etc, or a proper medication code, let alone the rest of the MedicationRequest resource content.
### Example 1 : Nice simple case - a single dosage
Take Perindopril, 1 tablet per day, for 3 months.
- [Structure](#tabs-Example1-struc)
- [JSON](#tabs-Example1-json)
- [XML](#tabs-Example1-xml)
**Structure**
- `MedicationRequest.medication.concept` = “Perindopril Arginine 2.5 mg tablet”
- `MedicationRequest.dosageInstruction.renderedDosageInstruction` = “1 tablet per day for 3 months”
- `MedicationRequest.dosageInstruction.simple.timing.repeat.boundsDuration` = 3 mo
- `…timing.repeat.frequency/period/periodUnit` = 1 / 1 / d
- `…doseAndRate[0].doseQuantity` = 1 tablet (or explicit mg if desired)
MedicationRequest
medication
concept
coding: Perindopril Arginine, 2.5mg tablets
dosageInstruction
renderedInstruction: 1 tablet per day for 3 months
simple
timing
repeat
boundsDuration: 3 mo
frequency : 1
period: 1
periodUnit: d
doseAndRate
doseQuantity: 10 mg
**JSON**
{
"resourceType": "MedicationRequest",
"medication": {
"concept": {
"text": "Perindopril Arginine, 2.5mg tablets"
}
},
"dosageInstruction": {
"renderedInstruction": "1 tablet per day for 3 months",
"simple": {
"timing": {
"repeat": {
"boundsDuration": {
"value": 3,
"unit": "mo",
"system": "http://unitsofmeasure.org",
"code": "mo"
},
"frequency": 1,
"period": 1,
"periodUnit": "d"
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 10,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
}
}
}
**XML**
**Notes:**
- If tablet strength is encoded in the product, keep dose as “1 tablet”
### Example 2 : Variant dosages at different times of the day, with cumulative dose limits
Methylphenidate 10 mg tablets — 10 mg at 07:30 and 12:00, 5 mg at 16:00 Mon–Fri; 10 mg at 08:00 Sat–Sun and holidays; 5 mg PRN after 17:00 (max 2×/week); do not exceed 150 mg per week.
- [Structure](#tabs-Example2-struc)
- [JSON](#tabs-Example2-json)
- [XML](#tabs-Example2-xml)
**Structure**
- Model as one step with multiple `component` entries (by dayOfWeek/timeOfDay) + one PRN `component`entry in that `step`.
- `Dosage.timing.repeat.dayOfWeek` and `...timeOfDay` for fixed administrations.
- `Dosage.asNeededBoolean` for PRN (evening); optionally `…when = EVE`.
- `Dosage.maxDosePerPeriod` (Ratio) for 150 mg per week.
- `MedicationRequest.dosageInstruction.safety.doseLimit` (scope=`period`) for 150 mg per week.
MedicationRequest
medication
concept
coding: Methylphenidate 10 mg tablets
dosageInstruction
step
component
timing
repeat
dayOfWeek: mon | tue | wed | thu | fri
timeOfDay: 07:30 | 12:00
doseAndRate
doseQuantity: 10 mg
component
timing
repeat
dayOfWeek: mon | tue | wed | thu | fri
timeOfDay: 16:00
doseAndRate
doseQuantity: 5 mg
component
timing
repeat
dayOfWeek: sat | sun
timeOfDay: 08:00
doseAndRate
doseQuantity: 10 mg
component
asNeeded: true
timing
repeat
when: EVE
doseAndRate
doseQuantity: 5 mg
safety
doseLimit
valueQuantity: 2 tablets
scope: administration
safety
doseLimit
valueQuantity: 150 mg
scope: period
period: 1 week
**JSON**
{
"resourceType": "MedicationRequest",
"medication": {
"concept": {
"text": "Methylphenidate 10 mg tablets"
}
},
"dosageInstruction": {
"step": \[{
"component": \[
{
"timing": {
"repeat": {
"dayOfWeek": \["mon", "tue", "wed", "thu", "fri"\],
"timeOfDay": \["07:30", "12:00"\]
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 10,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
},
{
"timing": {
"repeat": {
"dayOfWeek": \["mon", "tue", "wed", "thu", "fri"\],
"timeOfDay": \["16:00"\]
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 5,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
},
{
"timing": {
"repeat": {
"dayOfWeek": \["sat", "sun"\],
"timeOfDay": \["08:00"\]
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 10,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
},
{
"asNeeded": true,
"timing": {
"repeat": {
"when": \["EVE"\]
}
},
"safety": {
"doseLimit": \[{
"valueQuantity": {
"value": 2,
"unit": "s",
"system": "http://unitsofmeasure.org",
"code": "tbl"
},
"scope": "administration"
}\]
}
}
\]
}\],
"safety": {
"doseLimit": \[{
"valueQuantity": {
"value": 150,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
},
"scope": "period",
"period": {
"value": 1,
"unit": "week",
"system": "http://unitsofmeasure.org",
"code": "wk"
}
}\]
}
}
}
**XML**
**Not supported / Caveats:** “and holidays” is ambiguous;this might be found in an extension, or in narrative.
### Example 3 : Tapered dose, with some interlaced dosages
Prednisone 10 mg tablets (oral)
- 40 mg (4 × 10 mg) at 08:00 and 20:00 daily for 5 days;
- then 30 mg at 08:00 and 20 mg at 20:00 for 5 days;
- then 20 mg at 08:00 daily for 10 days;
- then 10 mg at 08:00 daily for 5 days;
- then 5 mg at 08:00 daily for 5 days;
- then continue 5 mg at 08:00 every other day for 3 months (or as needed for flare-ups, max two courses per 6 months); then stop.
- [Structure](#tabs-Example3-struc)
- [JSON](#tabs-Example3-json)
- [XML](#tabs-Example3-xml)
**Structure**
- Represent each step as a separate `dosageDetails.step` with its own `timing.repeat` and dose.
- “Every other day” → `period=2`, `periodUnit=d`.
- Optional PRN course as a separate PRN `dosageDetails.step` (narrative driven).
MedicationRequest
medication
concept
coding: Prednisone 10 mg tablets
dosageInstruction
step
component
timing
repeat
boundsDuration: 5 days
frequency: 2
period: 1
periodUnit: d
timeOfDay: 08:00 | 20:00
doseAndRate
doseQuantity: 40 mg
step
component
timing
repeat
count: 5
period: 1
periodUnit: d
timeOfDay: 08:00
doseAndRate
doseQuantity: 30 mg
component
timing
repeat
count: 5
period: 1
periodUnit: d
timeOfDay: 20:00
doseAndRate
doseQuantity: 20 mg
step
component
timing
repeat
count: 10
period: 1
periodUnit: d
timeOfDay: 08:00
doseAndRate
doseQuantity: 20 mg
step
component
timing
repeat
count: 5
period: 1
periodUnit: d
timeOfDay: 08:00
doseAndRate
doseQuantity: 10 mg
step
component
timing
repeat
count: 5
period: 1
periodUnit: d
timeOfDay: 08:00
doseAndRate
doseQuantity: 5 mg
step
component
timing
repeat
boundsDuration: 3 m
period: 2
periodUnit: d
timeOfDay: 08:00
doseAndRate
doseQuantity: 5 mg
step
component
asNeeded : true
timing
repeat
boundsDuration: 3 m
doseAndRate
doseQuantity: 5 mg
safety
doseLimit
valueInteger: 2
Period: 6 months
**JSON**
{
"resourceType": "MedicationRequest",
"medication": {
"concept": {
"text": "Prednisone 10 mg tablets"
}
},
"dosageInstruction": {
"step": \[
{
"component": \[
{
"timing": {
"repeat": {
"boundsDuration": {
"value": 5,
"unit": "days",
"system": "http://unitsofmeasure.org",
"code": "d"
},
"frequency": 2,
"period": 1,
"periodUnit": "d",
"timeOfDay": \["08:00", "20:00"\]
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 40,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
}
\]
},
{
"component": \[
{
"timing": {
"repeat": {
"count": 5,
"period": 1,
"periodUnit": "d",
"timeOfDay": \["08:00"\]
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 30,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
},
{
"timing": {
"repeat": {
"count": 5,
"period": 1,
"periodUnit": "d",
"timeOfDay": \["20:00"\]
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 20,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
}
\]
},
{
"component": \[
{
"timing": {
"repeat": {
"count": 10,
"period": 1,
"periodUnit": "d",
"timeOfDay": \["08:00"\]
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 20,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
}
\]
},
{
"component": \[
{
"timing": {
"repeat": {
"count": 5,
"period": 1,
"periodUnit": "d",
"timeOfDay": \["08:00"\]
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 10,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
}
\]
},
{
"component": \[
{
"timing": {
"repeat": {
"count": 5,
"period": 1,
"periodUnit": "d",
"timeOfDay": \["08:00"\]
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 5,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
}
\]
},
{
"component": \[
{
"timing": {
"repeat": {
"boundsDuration": {
"value": 3,
"unit": "months",
"system": "http://unitsofmeasure.org",
"code": "mo"
},
"period": 2,
"periodUnit": "d",
"timeOfDay": \["08:00"\]
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 5,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
}
\]
},
{
"component": \[
{
"asNeeded": true,
"timing": {
"repeat": {
"boundsDuration": {
"value": 3,
"unit": "months",
"system": "http://unitsofmeasure.org",
"code": "mo"
}
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 5,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
}
\]
}
\],
"safety": {
"doseLimit": \[{
"valueInteger": 2,
"period": {
"value": 2,
"unit": "months",
"system": "http://unitsofmeasure.org",
"code": "mo"
}
}\]
}
}
}
**XML**
**Notes:**
- The instructions are ambiguous with regard to flare-ups - is this just straight PRN? or is the intent to repeat the whole course? Humans differ in their understanding of this, and the ambiguity has been preserved as a good example of the real world challenges involved here
- For the purpose of this example, it has been interpreted as an instruction to repeat the whole course.
### Example 4 : different dosages on different days in a repeating pattern
Epirubicin 45 mg/m² IV on Days 1 & 8 every 28 days × 6 cycles; infuse over 20 min at 09:00; do not exceed 90 mg/m² per 28-day cycle or 900 mg/m² lifetime cumulative dose.
- [Structure](#tabs-Example4-struc)
- [JSON](#tabs-Example4-json)
- [XML](#tabs-Example4-xml)
**Structure**
- Two `dosageDetails.step.component` entries for Day 1 and Day 8 of each 28-day period (×6 cycles).
- Infusion duration → `Dosage.timing.repeat.duration`\=20, `durationUnit`\=min; or encode under `doseAndRate.rate[x]` if modeled as rate.
- Maxima via `MedicationRequest.dosageInstruction.safety.doseLimit` with scopes `period` (per cycle) and `lifetime`.
- Day-8 offset is expressed via a `Timing.repeat` extension (e.g., `startOffset=8 d`).
MedicationRequest
medication
concept
coding: Epirubicin
dosageInstruction
step
component
timing
repeat
count: 6
duration: 20
durationUnit: min
period: 28
periodUnit: d
timeOfDay: 09:00
doseAndRate
rateQuantity: 45 mg/m²
component
timing
repeat
count: 6
duration: 20
durationUnit: min
period: 28
periodUnit: d
startOffset = 8 d
timeOfDay: 09:00
doseAndRate
rateQuantity: 45 mg/m²
safety
doseLimit\[0\]
valueQuantity: 90 mg/m2
scope: dosage
doseLimit\[1\]
valueQuantity: 900 mg/m²
scope: lifetime
**JSON**
{
"resourceType": "MedicationRequest",
"medication": {
"concept": {
"text": "Epirubicin"
}
},
"dosageInstruction": {
"step": \[
{
"component": \[
{
"timing": {
"repeat": {
"count": 6,
"duration": 20,
"durationUnit": "min",
"period": 28,
"periodUnit": "d",
"timeOfDay": \["09:00"\]
}
},
"doseAndRate": \[
{
"rateQuantity": {
"value": 45,
"unit": "mg/m²",
"system": "http://unitsofmeasure.org",
"code": "mg/m2"
}
}
\]
},
{
"timing": {
"repeat": {
"count": 6,
"duration": 20,
"durationUnit": "min",
"period": 28,
"periodUnit": "d",
"startOffset": {
"value": 8,
"unit": "days",
"system": "http://unitsofmeasure.org",
"code": "d"
},
"timeOfDay": \["09:00"\]
}
},
"doseAndRate": \[
{
"rateQuantity": {
"value": 45,
"unit": "mg/m²",
"system": "http://unitsofmeasure.org",
"code": "mg/m2"
}
}
\]
}
\]
}
\],
"safety": {
"doseLimit": \[
{
"valueQuantity": {
"value": 90,
"unit": "mg/m²",
"system": "http://unitsofmeasure.org",
"code": "mg/m2"
},
"scope": "dosage"
},
{
"valueQuantity": {
"value": 900,
"unit": "mg/m²",
"system": "http://unitsofmeasure.org",
"code": "mg/m2"
},
"scope": "lifetime"
}
\]
}
}
}
**XML**
**Notes:**
- The structure does not say what /m2 is of - that does not appear to be computable (it’s skin surface area for the patient)
- Even when understood, mg/m² requires external patient BSA
### Example 5 : Triphase contraceptives
Microgynon tab (contraceptives): 1 tablet daily for 21 days, then 7 days off. Then repeat
- [Structure](#tabs-Example5-struc)
- [JSON](#tabs-Example5-json)
- [XML](#tabs-Example5-xml)
**Structure**
- Express repeating 28-day cycles with `Timing.repeat.endOffset = 7 d` for the off-interval.
- Alternative: two steps—21 daily doses followed by a “break” step with 0 dose; then repeat via new order or plan definition.
- Narrative should clarify if placebos are present (daily intake without true off days).
MedicationRequest
medication
concept
coding: Microgynon tab
dosageInstruction
simple
timing
repeat
endOffset = 7 d
frequency: 21
period: 28
periodUnit: d
doseAndRate
doseQuantity: 1 tablet
**JSON**
{
"resourceType": "MedicationRequest",
"medication": {
"concept": {
"text": "Microgynon tab"
}
},
"dosageInstruction": {
"simple": {
"timing": {
"repeat": {
"endOffset": {
"value": 7,
"unit": "days",
"system": "http://unitsofmeasure.org",
"code": "d"
},
"frequency": 21,
"period": 28,
"periodUnit": "d"
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 1,
"unit": "tablet",
"system": "http://unitsofmeasure.org",
"code": "{tablet}"
}
}
\]
}
}
}
**XML**
**Notes:**
- Retail tri-phase contraceptives don’t work like this - they have placebos so that you take a pill every day, and the pills are all day-numbered. There's no way to represent 'take the right numbered pill for the day of your cycle' in the DosageDetails structure
### Example 6 : Simple case of limited dose
Iron sucrose: “Mon/Wed/Fri 09:00 × 5 doses total.
- [Structure](#tabs-Example6-struc)
- [JSON](#tabs-Example6-json)
- [XML](#tabs-Example6-xml)
**Structure**
- `timing.repeat.dayOfWeek` = Mon|Wed|Fri; `timeOfDay` = 09:00; `count` = 5.
MedicationRequest
medication
concept
coding: Iron sucrose
dosageInstruction
simple
timing
repeat
count: 5
period: 1
periodUnit: d
dayOfWeek = Mon|Wed|Fri
timeOfDay: 09:00
**JSON**
{
"resourceType": "MedicationRequest",
"medication": {
"concept": {
"text": "Iron sucrose"
}
},
"dosageInstruction": {
"simple": {
"timing": {
"repeat": {
"count": 5,
"period": 1,
"periodUnit": "d",
"dayOfWeek": \["mon", "wed", "fri"\],
"timeOfDay": \["09:00"\]
}
}
}
}
}
**XML**
### Example 7 : Dual Maximums - per admin, and per day
Symbicort (budesonide/formoterol):
- 2 inhalations per day either as 1 in the morning and in the evening; or 2 in either the morning or evening
- 1 additional inhalation as need (PRN)
- Maximum dose in a single administration no more than 6 inhalations (upper limit per administration)
- Maximum daily dose = no more than 12 inhalations (upper limit per day)
- [Structure](#tabs-Example7-struc)
- [JSON](#tabs-Example7-json)
- [XML](#tabs-Example7-xml)
**Structure**
- Model planned daily dosing and PRN as separate `dosageDetails.step.component` entries.
- Use `MedicationRequest.dosageInstruction.safety.doseLimit` with `scope=administration` (6 puffs) and `scope=period` (12 puffs / 1 day).
MedicationRequest
medication
concept
coding: Symbicort
dosageInstruction
step
component
timing
when: MORN | EVE
doseAndRate
rateQuantity: 2 puffs/day
component
asNeeded: true
safety
doseLimit\[0\]
valueQuantity: 12 puffs
scope: period
period: 1 day
doseLimit\[1\]
valueQuantity: 6 puffs
scope: administration
**JSON**
{
"resourceType": "MedicationRequest",
"medication": {
"concept": {
"text": "Symbicort"
}
},
"dosageInstruction": {
"step": \[
{
"component": \[
{
"timing": {
"repeat": {
"when": \["MORN", "EVE"\]
}
},
"doseAndRate": \[
{
"rateQuantity": {
"value": 2,
"unit": "puffs/day",
"system": "http://unitsofmeasure.org",
"code": "{puff}/d"
}
}
\]
},
{
"asNeeded": true
}
\]
}
\],
"safety": {
"doseLimit": \[
{
"valueQuantity": {
"value": 12,
"unit": "puffs",
"system": "http://unitsofmeasure.org",
"code": "{puff}"
},
"scope": "period",
"period": {
"value": 1,
"unit": "day",
"system": "http://unitsofmeasure.org",
"code": "d"
}
},
{
"valueQuantity": {
"value": 6,
"unit": "puffs",
"system": "http://unitsofmeasure.org",
"code": "{puff}"
},
"scope": "administration"
}
\]
}
}
}
**XML**
### Example 8 : Pinning to a day of the month
Vitamin D 1 vial the first day of each month.
- [Structure](#tabs-Example8-struc)
- [JSON](#tabs-Example8-json)
- [XML](#tabs-Example8-xml)
**Structure**
- Use extension [`timing-dayOfMonth`](https://build.fhir.org/ig/HL7/fhir-extensions/extensions-StructureDefinition-timing-dayOfMonth.html) with value 1.
- `frequency=1`, `period=1`, `periodUnit=mo`.
MedicationRequest
medication
concept
coding: Vitamin D
dosageInstruction
simple
timing
repeat
extension\['%timing-dayOfMonth'\].valueInteger: 1
frequency: 1
period: 1
periodUnit: mo
**JSON**
{
"resourceType": "MedicationRequest",
"medication": {
"concept": {
"text": "Vitamin D"
}
},
"dosageInstruction": {
"simple": {
"timing": {
"repeat": {
"extension": \[
{
"url": "http://hl7.org/fhir/StructureDefinition/timing-dayOfMonth",
"valueInteger": 1
}
\],
"frequency": 1,
"period": 1,
"periodUnit": "mo"
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 1,
"unit": "dose",
"system": "http://unitsofmeasure.org",
"code": "{dose}"
}
}
\]
}
}
}
**XML**
**Notes:**
- This uses the extension http://hl7.org/fhir/StructureDefinition/timing-dayOfMonth to pin the recurrent event to a day of the month (like day of week). This extension is defined in the [Extensions Pack](http://hl7.org/fhir/extensions) (or will be)
### Example 9 : A break in the course
1 tablet a day for a week, then 3 days break, then 1 tablet a day for 3 days
- [Structure](#tabs-Example9-struc)
- [JSON](#tabs-Example9-json)
- [XML](#tabs-Example9-xml)
**Structure**
- Model as three steps (7 doses → break → 3 doses). A “break” can be expressed as a component with dose=0.
MedicationRequest
medication
concept
coding: Vitamin D
dosageInstruction
step
component
timing
repeat
count : 7
period: 1
periodUnit: d
doseAndRate
doseQuantity: 1 tablet
step
component
timing
repeat
count : 3
period: 1
periodUnit: d
doseAndRate
doseQuantity: 0 tablet
step
component
timing
repeat
count : 3
period: 1
periodUnit: d
doseAndRate
doseQuantity: 1 tablet
**JSON**
{
"resourceType": "MedicationRequest",
"medication": {
"concept": {
"text": "Vitamin D"
}
},
"dosageInstruction": {
"step": \[
{
"component": \[
{
"timing": {
"repeat": {
"count": 7,
"period": 1,
"periodUnit": "d"
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 1,
"unit": "tablet",
"system": "http://unitsofmeasure.org",
"code": "{tablet}"
}
}
\]
}
\]
},
{
"component": \[
{
"timing": {
"repeat": {
"count": 3,
"period": 1,
"periodUnit": "d"
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 0,
"unit": "tablet",
"system": "http://unitsofmeasure.org",
"code": "{tablet}"
}
}
\]
}
\]
},
{
"component": \[
{
"timing": {
"repeat": {
"count": 3,
"period": 1,
"periodUnit": "d"
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 1,
"unit": "tablet",
"system": "http://unitsofmeasure.org",
"code": "{tablet}"
}
}
\]
}
\]
}
\]
}
}
**XML**
**Notes:**
- You can also use the endOffset element in Timing to give a regular break; this technique here is for irregular breaks
### Example 10 : Event Dependency
Malaria prophylaxis: start 1 day before start of (event), stop 7 days after end of (event)
- [Structure](#tabs-Example10-struc)
- [JSON](#tabs-Example10-json)
- [XML](#tabs-Example10-xml)
**Structure**
- event-relative offsets as extensions on the regimen step (e.g., `start.offset = -1 d`).
- Duration/count of daily administrations by `timing.repeat`.
MedicationRequest
medication
concept
coding: Malaria XXX
dosageInstruction
step
start
contextCode
coding : \[start of trip\]
offsetDuration: -1 d
end
contextCode
coding : \[end of trip\]
offsetDuration: 7 d
component
timing
repeat
period: 1
periodUnit: d
**JSON**
{
"resourceType": "MedicationRequest",
"medication": {
"concept": {
"text": "Malaria XXX"
}
},
"dosageInstruction": {
"step": \[{
"start": {
"contextCode": {
"coding": \[
{
"system": "http://example.org/travel-context",
"code": "trip-start",
"display": "start of trip"
}
\]
},
"offsetDuration": {
"value": -1,
"unit": "days",
"system": "http://unitsofmeasure.org",
"code": "d"
}
},
"end": {
"contextCode": {
"coding": \[
{
"system": "http://example.org/travel-context",
"code": "trip-end",
"display": "end of trip"
}
\]
},
"offsetDuration": {
"value": 7,
"unit": "days",
"system": "http://unitsofmeasure.org",
"code": "d"
}
},
"component": \[{
"timing": {
"repeat": {
"period": 1,
"periodUnit": "d"
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 1,
"unit": "dose",
"system": "http://unitsofmeasure.org",
"code": "{dose}"
}
}\]
}\]
}\]
}
}
**XML**
**Caveat:** Event semantics are primarily for rendering/coordination, not general computation.
### Example 11 : Event Dependency in steps
PREDNISOLONE 20 mg : 60 mg morning until 3 negative urine strip then 50 mg morning for 1 week, then 40 mg morning for 1 week, then 30 mg morning for 1 week, then 20 mg morning for 1 week, then 10 mg morning for 2 weeks, then see doctor for stopping treatment depending on evolution
- [Structure](#tabs-Example11-struc)
- [JSON](#tabs-Example11-json)
- [XML](#tabs-Example11-xml)
**Structure**
- Use separate `dosageDetails.step` entries per step (weekly bounds).
- reference an `EventDefinition` to describe the “3 negative strips” event
MedicationRequest
medication
concept
coding: PREDNISOLONE 20 mg
dosageInstruction
step
end
contextDefinition: EventDefinition/example-data-with-profile
component
timing
repeat
period: 1
periodUnit: d
when: MORN
doseAndRate
doseQuantity: 60mg
step
component
timing
repeat
boundsDuration: 1 wk
period: 1
periodUnit: d
when: MORN
doseAndRate
doseQuantity: 50mg
step
component
timing
repeat
boundsDuration: 1 wk
period: 1
periodUnit: d
when: MORN
doseAndRate
doseQuantity: 40mg
step
component
timing
repeat
boundsDuration: 1 wk
period: 1
periodUnit: d
when: MORN
doseAndRate
doseQuantity: 30mg
# etc
**JSON**
{
"resourceType": "MedicationRequest",
"medication": {
"concept": {
"text": "PREDNISOLONE 20 mg"
}
},
"dosageInstruction": {
"step": \[
{
"end": {
"contextDefinition": "http://hl7.org/fhir/EventDefinition/example-data-with-profile"
},
"component": \[
{
"timing": {
"repeat": {
"period": 1,
"periodUnit": "d",
"when": \["MORN"\]
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 60,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
}
\]
},
{
"component": \[
{
"timing": {
"repeat": {
"boundsDuration": {
"value": 1,
"unit": "week",
"system": "http://unitsofmeasure.org",
"code": "wk"
},
"period": 1,
"periodUnit": "d",
"when": \["MORN"\]
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 40,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
},
{
"timing": {
"repeat": {
"boundsDuration": {
"value": 1,
"unit": "week",
"system": "http://unitsofmeasure.org",
"code": "wk"
},
"period": 1,
"periodUnit": "d",
"when": \["MORN"\]
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 30,
"unit": "mg",
"system": "http://unitsofmeasure.org",
"code": "mg"
}
}
\]
}
\]
}
\]
}
}
**XML**
**Notes:**
- Note that the computational space of events is absolutely massive, so implementations that try to use this extension shouldn’t expect the event to actually be understood, just rendered - so marginal utility over just putting it in text
### Example 12 : Event Dependency in steps
Dovobet ointment: When needed a treatment period of 4 weeks starts. Applied once daily. Treatment period could be repeated if needed. When using calcipotriol containing medicinal products, the maximum daily dose should not exceed 15 g. The body surface area treated with calcipotriol containing medicinal products should not exceed 30 %
- [Structure](#tabs-Example12-struc)
- [JSON](#tabs-Example12-json)
- [XML](#tabs-Example12-xml)
**Structure**
- Two steps: an initial 4-week course and a repeatable “if needed” 4-week course.
- Limits via `MedicationRequest.dosageInstruction.safety.doseLimit`: 15 g per 1 day (`scope=period`); “≤30% surface area” captured as narrative or profiled percent on `scope=administration`.
MedicationRequest
medication
concept
coding: Dovobet ointment
dosageInstruction
step
component
timing
boundsDuration: 4 wk
repeat
period: 1
periodUnit: d
step
component
condition
code: http://hl7.org/fhir/CodeSystem/dosage-condition-code#if needed
timing
repeat
boundsDuration: 4 wk
period: 1
periodUnit: d
safety
doseLimit\[0\]
valueQuantity: 15g
scope: period
period: 1 day
doseLimit\[1\]
valueQuantity: 30%{surface area}
scope: administration
**JSON**
{
"resourceType": "MedicationRequest",
"medication": {
"concept": {
"text": "Dovobet ointment"
}
},
"dosageInstruction": {
"step": \[
{
"component": \[
{
"timing": {
"repeat": {
"boundsDuration": {
"value": 4,
"unit": "weeks",
"system": "http://unitsofmeasure.org",
"code": "wk"
},
"period": 1,
"periodUnit": "d"
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 1,
"unit": "application",
"system": "http://unitsofmeasure.org",
"code": "{application}"
}
}
\]
}
\]
},
{
"component": \[
{
"condition": \[{
"code": {
"coding": \[
{
"system": "http://hl7.org/fhir/CodeSystem/dosage-condition-code",
"code": "if-needed",
"display": "if needed"
}
\]
}
}\],
"timing": {
"repeat": {
"boundsDuration": {
"value": 4,
"unit": "weeks",
"system": "http://unitsofmeasure.org",
"code": "wk"
},
"period": 1,
"periodUnit": "d"
}
},
"doseAndRate": \[
{
"doseQuantity": {
"value": 1,
"unit": "application",
"system": "http://unitsofmeasure.org",
"code": "{application}"
}
}
\]
}
\]
}
\],
"safety": {
"doseLimit": \[
{
"valueQuantity": {
"value": 15,
"unit": "g",
"system": "http://unitsofmeasure.org",
"code": "g"
},
"scope": "period",
"period": {
"value": 1,
"unit": "day",
"system": "http://unitsofmeasure.org",
"code": "d"
}
},
{
"valueQuantity": {
"value": 30,
"unit": "%{surface area}",
"system": "http://unitsofmeasure.org",
"code": "%"
},
"scope": "administration"
}
\]
}
}
}
**XML**
**Notes:**
- The contextCode = if needed is different to dosage.asNeeded because the latter is ‘take a dose if needed’, where as the former is ‘do this entire dosage if needed’
- There’s no hint as to what the 30% is about - 30% of \*what\*? This will be found in the renderedInstruction
- Event when understood, 30% of body surface area requires external context
\[%file newfooter%\] // Try to restore last selected tab index (shared across examples) var idx = 0; try { var stored = sessionStorage.getItem('fhir-example-tab-index'); if (stored !== null) idx = parseInt(stored, 10) || 0; } catch (e) {} var currentTabIndex = idx; $( '#tabs-Example1' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-Example2' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-Example3' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-Example4' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-Example5' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-Example6' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-Example7' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-Example8' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-Example9' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-Example10' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-Example11' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); $( '#tabs-Example12' ).tabs({ active: currentTabIndex, activate: function( event, ui ) { store(ui.newTab.index()); } }); function store(currentTab) { document.activeElement.blur(); try { sessionStorage.setItem('fhir-example-tab-index', currentTab); } catch(exception){ } $( '#tabs-Example1' ).tabs('option', 'active', currentTab); $( '#tabs-Example2' ).tabs('option', 'active', currentTab); $( '#tabs-Example3' ).tabs('option', 'active', currentTab); $( '#tabs-Example4' ).tabs('option', 'active', currentTab); $( '#tabs-Example5' ).tabs('option', 'active', currentTab); $( '#tabs-Example6' ).tabs('option', 'active', currentTab); $( '#tabs-Example7' ).tabs('option', 'active', currentTab); $( '#tabs-Example8' ).tabs('option', 'active', currentTab); $( '#tabs-Example9' ).tabs('option', 'active', currentTab); $( '#tabs-Example10' ).tabs('option', 'active', currentTab); $( '#tabs-Example11' ).tabs('option', 'active', currentTab); $( '#tabs-Example12' ).tabs('option', 'active', currentTab); }