[%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:Informative |
|---|
This page presents a series of examples of how to use DosageDetails 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
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
<MedicationRequest xmlns="http://hl7.org/fhir"> <medication> <concept> <text value="Perindopril Arginine, 2.5mg tablets"/> </concept> </medication> <dosageInstruction> <renderedInstruction value="1 tablet per day for 3 months"/> <simple> <timing> <repeat> <boundsDuration> <value value="3"/> <unit value="mo"/> <system value="http://unitsofmeasure.org"/> <code value="mo"/> </boundsDuration> <frequency value="1"/> <period value="1"/> <periodUnit value="d"/> </repeat> </timing> <doseAndRate> <doseQuantity> <value value="10"/> <unit value="mg"/> <system value="http://unitsofmeasure.org"/> <code value="mg"/> </doseQuantity> </doseAndRate> </simple> </dosageInstruction> </MedicationRequest>
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
- Model as one step with multiple
componententries (by dayOfWeek/timeOfDay) + one PRNcomponententry in thatstep. Dosage.timing.repeat.dayOfWeekand...timeOfDayfor fixed administrations.Dosage.asNeededBooleanfor 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
<MedicationRequest xmlns="http://hl7.org/fhir">
<medication>
<concept>
<text value="Methylphenidate 10 mg tablets"/>
</concept>
</medication>
<dosageInstruction>
<step>
<component>
<timing>
<repeat>
<dayOfWeek value="mon"/>
<dayOfWeek value="tue"/>
<dayOfWeek value="wed"/>
<dayOfWeek value="thu"/>
<dayOfWeek value="fri"/>
<timeOfDay value="07:30"/>
<timeOfDay value="12:00"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="10"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
<component>
<timing>
<repeat>
<dayOfWeek value="mon"/>
<dayOfWeek value="tue"/>
<dayOfWeek value="wed"/>
<dayOfWeek value="thu"/>
<dayOfWeek value="fri"/>
<timeOfDay value="16:00"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="5"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
<component>
<timing>
<repeat>
<dayOfWeek value="sat"/>
<dayOfWeek value="sun"/>
<timeOfDay value="08:00"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="10"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
<component>
<asNeeded value="true"/>
<timing>
<repeat>
<when value="EVE"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="5"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
<safety>
<doseLimit>
<valueQuantity>
<value value="2"/>
<unit value="tablet"/>
<system value="http://unitsofmeasure.org"/>
<code value="tbl"/>
</valueQuantity>
<scope value="administration"/>
</doseLimit>
</safety>
</component>
</step>
<safety>
<doseLimit>
<valueQuantity>
<value value="150"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</valueQuantity>
<scope value="period"/>
<period>
<value value="1"/>
<unit value="week"/>
<system value="http://unitsofmeasure.org"/>
<code value="wk"/>
</period>
</doseLimit>
</safety>
<safety>
<doseLimit>
<valueQuantity>
<value value="150"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</valueQuantity>
<scope value="period"/>
<period>
<value value="1"/>
<unit value="week"/>
<system value="http://unitsofmeasure.org"/>
<code value="wk"/>
</period>
</doseLimit>
</safety>
</dosageInstruction>
</MedicationRequest>
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
- Represent each step as a separate
dosageDetails.stepwith its owntiming.repeatand 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
<MedicationRequest xmlns="http://hl7.org/fhir"> <medication> <concept> <text value="Prednisone 10 mg tablets"/> </concept> </medication> <dosageInstruction>
<step>
<component>
<timing>
<repeat>
<boundsDuration>
<value value="5"/>
<unit value="days"/>
<system value="http://unitsofmeasure.org"/>
<code value="d"/>
</boundsDuration>
<frequency value="2"/>
<period value="1"/>
<periodUnit value="d"/>
<timeOfDay value="08:00"/>
<timeOfDay value="20:00"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="40"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
<!-- Step 2: 30mg morning, 20mg evening for 5 days -->
<step>
<component>
<timing>
<repeat>
<count value="5"/>
<period value="1"/>
<periodUnit value="d"/>
<timeOfDay value="08:00"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="30"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
<component>
<timing>
<repeat>
<count value="5"/>
<period value="1"/>
<periodUnit value="d"/>
<timeOfDay value="20:00"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="20"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
<!-- Step 3: 20mg daily for 10 days -->
<step>
<component>
<timing>
<repeat>
<count value="10"/>
<period value="1"/>
<periodUnit value="d"/>
<timeOfDay value="08:00"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="20"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
<!-- Step 4: 10mg daily for 5 days -->
<step>
<component>
<timing>
<repeat>
<count value="5"/>
<period value="1"/>
<periodUnit value="d"/>
<timeOfDay value="08:00"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="10"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
<!-- Step 5: 5mg daily for 5 days -->
<step>
<component>
<timing>
<repeat>
<count value="5"/>
<period value="1"/>
<periodUnit value="d"/>
<timeOfDay value="08:00"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="5"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
<!-- Step 6: 5mg every other day for 3 months -->
<step>
<component>
<timing>
<repeat>
<boundsDuration>
<value value="3"/>
<unit value="months"/>
<system value="http://unitsofmeasure.org"/>
<code value="mo"/>
</boundsDuration>
<period value="2"/>
<periodUnit value="d"/>
<timeOfDay value="08:00"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="5"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
<!-- Step 7: 5mg as needed for 3 months -->
<step>
<component>
<asNeeded value="true"/>
<timing>
<repeat>
<boundsDuration>
<value value="3"/>
<unit value="months"/>
<system value="http://unitsofmeasure.org"/>
<code value="mo"/>
</boundsDuration>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="5"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
<safety>
<doseLimit>
<valueInteger value="2"/>
<period>
<value value="2"/>
<unit value="months"/>
<system value="http://unitsofmeasure.org"/>
<code value="mo"/>
</period>
</doseLimit>
</safety>
</dosageInstruction> </MedicationRequest>
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
- Two
dosageDetails.step.componententries for Day 1 and Day 8 of each 28-day period (×6 cycles). - Infusion duration →
Dosage.timing.repeat.duration=20,durationUnit=min; or encode underdoseAndRate.rate[x]if modeled as rate. - Maxima via
MedicationRequest.dosageInstruction.safety.doseLimitwith scopesperiod(per cycle) andlifetime. - Day-8 offset is expressed via a
Timing.repeatextension (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
<MedicationRequest xmlns="http://hl7.org/fhir"> <medication> <concept> <text value="Epirubicin"/> </concept> </medication> <dosageInstruction> <step> <component> <timing> <repeat> <count value="6"/> <duration value="20"/> <durationUnit value="min"/> <period value="28"/> <periodUnit value="d"/> <timeOfDay value="09:00"/> </repeat> </timing> <doseAndRate> <rateQuantity> <value value="45"/> <unit value="mg/m²"/> <system value="http://unitsofmeasure.org"/> <code value="mg/m2"/> </rateQuantity> </doseAndRate> </component> <component> <timing> <repeat> <count value="6"/> <duration value="20"/> <durationUnit value="min"/> <period value="28"/> <periodUnit value="d"/> <startOffset> <value value="8"/> <unit value="days"/> <system value="http://unitsofmeasure.org"/> <code value="d"/> </startOffset> <timeOfDay value="09:00"/> </repeat> </timing> <doseAndRate> <rateQuantity> <value value="45"/> <unit value="mg/m²"/> <system value="http://unitsofmeasure.org"/> <code value="mg/m2"/> </rateQuantity> </doseAndRate> </component> </step> <safety> <doseLimit> <valueQuantity> <value value="90"/> <unit value="mg/m²"/> <system value="http://unitsofmeasure.org"/> <code value="mg/m2"/> </valueQuantity> <scope value="dosage"/> </doseLimit> <doseLimit> <valueQuantity> <value value="900"/> <unit value="mg/m²"/> <system value="http://unitsofmeasure.org"/> <code value="mg/m2"/> </valueQuantity> <scope value="lifetime"/> </doseLimit> </safety> </dosageInstruction> </MedicationRequest>
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
- Express repeating 28-day cycles with
Timing.repeat.endOffset = 7 dfor 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
<MedicationRequest xmlns="http://hl7.org/fhir"> <medication> <concept> <text value="Microgynon tab"/> </concept> </medication> <dosageInstruction> <simple> <timing> <repeat> <endOffset> <value value="7"/> <unit value="days"/> <system value="http://unitsofmeasure.org"/> <code value="d"/> </endOffset> <frequency value="21"/> <period value="28"/> <periodUnit value="d"/> </repeat> </timing> <doseAndRate> <doseQuantity> <value value="1"/> <unit value="tablet"/> <system value="http://unitsofmeasure.org"/> <code value="{tablet}"/> </doseQuantity> </doseAndRate> </simple> </dosageInstruction> </MedicationRequest>
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
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
<MedicationRequest xmlns="http://hl7.org/fhir"> <medication> <concept> <text value="Iron sucrose"/> </concept> </medication> <dosageInstruction> <simple> <timing> <repeat> <count value="5"/> <period value="1"/> <periodUnit value="d"/> <dayOfWeek value="mon"/> <dayOfWeek value="wed"/> <dayOfWeek value="fri"/> <timeOfDay value="09:00"/> </repeat> </timing> <doseAndRate> <doseQuantity> <value value="1"/> <unit value="dose"/> <system value="http://unitsofmeasure.org"/> <code value="{dose}"/> </doseQuantity> </doseAndRate> </simple> </dosageInstruction> </MedicationRequest>
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
- Model planned daily dosing and PRN as separate
dosageDetails.step.componententries. - Use
MedicationRequest.dosageInstruction.safety.doseLimitwithscope=administration(6 puffs) andscope=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
<MedicationRequest xmlns="http://hl7.org/fhir"> <medication> <concept> <text value="Symbicort"/> </concept> </medication> <dosageInstruction> <step> <component> <timing> <repeat> <when value="MORN"/> <when value="EVE"/> </repeat> </timing> <doseAndRate> <rateQuantity> <value value="2"/> <unit value="puffs/day"/> <system value="http://unitsofmeasure.org"/> <code value="{puff}/d"/> </rateQuantity> </doseAndRate> </component> <component> <asNeeded value="true"/> </component> </step> <safety> <doseLimit> <valueQuantity> <value value="12"/> <unit value="puffs"/> <system value="http://unitsofmeasure.org"/> <code value="{puff}"/> </valueQuantity> <scope value="period"/> <period> <value value="1"/> <unit value="day"/> <system value="http://unitsofmeasure.org"/> <code value="d"/> </period> </doseLimit> <doseLimit> <valueQuantity> <value value="6"/> <unit value="puffs"/> <system value="http://unitsofmeasure.org"/> <code value="{puff}"/> </valueQuantity> <scope value="administration"/> </doseLimit> </safety> </dosageInstruction> </MedicationRequest>
Example 8 : Pinning to a day of the month
Vitamin D 1 vial the first day of each month.
Structure
- Use extension
timing-dayOfMonthwith 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
<MedicationRequest xmlns="http://hl7.org/fhir"> <medication> <concept> <text value="Vitamin D"/> </concept> </medication> <dosageInstruction> <simple> <timing> <repeat> <extension url="http://hl7.org/fhir/StructureDefinition/timing-dayOfMonth"> <valueInteger value="1"/> </extension> <frequency value="1"/> <period value="1"/> <periodUnit value="mo"/> </repeat> </timing> <doseAndRate> <doseQuantity> <value value="1"/> <unit value="dose"/> <system value="http://unitsofmeasure.org"/> <code value="{dose}"/> </doseQuantity> </doseAndRate> </simple> </dosageInstruction> </MedicationRequest>
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 (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
- 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
<MedicationRequest xmlns="http://hl7.org/fhir"> <medication> <concept> <text value="Vitamin D"/> </concept> </medication> <dosageInstruction>
<step>
<component>
<timing>
<repeat>
<count value="7"/>
<period value="1"/>
<periodUnit value="d"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="1"/>
<unit value="tablet"/>
<system value="http://unitsofmeasure.org"/>
<code value="{tablet}"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
<!-- Step 2: 0 tablets for 3 days -->
<step>
<component>
<timing>
<repeat>
<count value="3"/>
<period value="1"/>
<periodUnit value="d"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="0"/>
<unit value="tablet"/>
<system value="http://unitsofmeasure.org"/>
<code value="{tablet}"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
<!-- Step 3: 1 tablet daily for 3 days -->
<step>
<component>
<timing>
<repeat>
<count value="3"/>
<period value="1"/>
<periodUnit value="d"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="1"/>
<unit value="tablet"/>
<system value="http://unitsofmeasure.org"/>
<code value="{tablet}"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
</dosageInstruction> </MedicationRequest>
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
- 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
<MedicationRequest xmlns="http://hl7.org/fhir"> <medication> <concept> <text value="Malaria XXX"/> </concept> </medication> <dosageInstruction> <step> <start> <contextCode> <coding> <system value="http://example.org/travel-context"/> <code value="trip-start"/> <display value="start of trip"/> </coding> </contextCode> <offsetDuration> <value value="-1"/> <unit value="days"/> <system value="http://unitsofmeasure.org"/> <code value="d"/> </offsetDuration> </start> <end> <contextCode> <coding> <system value="http://example.org/travel-context"/> <code value="trip-end"/> <display value="end of trip"/> </coding> </contextCode> <offsetDuration> <value value="7"/> <unit value="days"/> <system value="http://unitsofmeasure.org"/> <code value="d"/> </offsetDuration> </end> </step> <timing> <repeat> <period value="1"/> <periodUnit value="d"/> </repeat> </timing> <doseAndRate> <doseQuantity> <value value="1"/> <unit value="dose"/> <system value="http://unitsofmeasure.org"/> <code value="{dose}"/> </doseQuantity> </doseAndRate> </dosageInstruction> </MedicationRequest>
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
- Use separate
dosageDetails.stepentries per step (weekly bounds). - reference an
EventDefinitionto 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
<MedicationRequest xmlns="http://hl7.org/fhir"> <medication> <concept> <text value="PREDNISOLONE 20 mg"/> </concept> </medication> <dosageInstruction>
<step>
<end>
<contextDefinition value="http://hl7.org/fhir/EventDefinition/example"/>
</end>
<component>
<timing>
<repeat>
<period value="1"/>
<periodUnit value="d"/>
<when value="MORN"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="60"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
<!-- Step 2: 40mg daily for 1 week -->
<step>
<component>
<timing>
<repeat>
<boundsDuration>
<value value="1"/>
<unit value="week"/>
<system value="http://unitsofmeasure.org"/>
<code value="wk"/>
</boundsDuration>
<period value="1"/>
<periodUnit value="d"/>
<when value="MORN"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="40"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
<!-- Step 3: 30mg daily for 1 week -->
<step>
<component>
<timing>
<repeat>
<boundsDuration>
<value value="1"/>
<unit value="week"/>
<system value="http://unitsofmeasure.org"/>
<code value="wk"/>
</boundsDuration>
<period value="1"/>
<periodUnit value="d"/>
<when value="MORN"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="30"/>
<unit value="mg"/>
<system value="http://unitsofmeasure.org"/>
<code value="mg"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
</dosageInstruction> </MedicationRequest>
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
- 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 onscope=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
<MedicationRequest xmlns="http://hl7.org/fhir"> <medication> <concept> <text value="Dovobet ointment"/> </concept> </medication> <dosageInstruction>
<step>
<component>
<timing>
<repeat>
<boundsDuration>
<value value="4"/>
<unit value="weeks"/>
<system value="http://unitsofmeasure.org"/>
<code value="wk"/>
</boundsDuration>
<period value="1"/>
<periodUnit value="d"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="1"/>
<unit value="application"/>
<system value="http://unitsofmeasure.org"/>
<code value="{application}"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
<!-- Step 2: As-needed for 4 weeks -->
<step>
<component>
<condition>
<code>
<coding>
<system value="http://hl7.org/fhir/CodeSystem/dosage-condition-code"/>
<code value="if-needed"/>
<display value="If Needed"/>
</coding>
</code>
</condition>
<timing>
<repeat>
<boundsDuration>
<value value="4"/>
<unit value="weeks"/>
<system value="http://unitsofmeasure.org"/>
<code value="wk"/>
</boundsDuration>
<period value="1"/>
<periodUnit value="d"/>
</repeat>
</timing>
<doseAndRate>
<doseQuantity>
<value value="1"/>
<unit value="application"/>
<system value="http://unitsofmeasure.org"/>
<code value="{application}"/>
</doseQuantity>
</doseAndRate>
</component>
</step>
<safety>
<doseLimit>
<valueQuantity>
<value value="15"/>
<unit value="g"/>
<system value="http://unitsofmeasure.org"/>
<code value="g"/>
</valueQuantity>
<scope value="period"/>
<period>
<value value="1"/>
<unit value="day"/>
<system value="http://unitsofmeasure.org"/>
<code value="d"/>
</period>
</doseLimit>
<doseLimit>
<valueQuantity>
<value value="30"/>
<unit value="%{surface area}"/>
<system value="http://unitsofmeasure.org"/>
<code value="%"/>
</valueQuantity>
<scope value="administration"/>
</doseLimit>
</safety>
</dosageInstruction> </MedicationRequest>
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); }