Skip to content

Instantly share code, notes, and snippets.

@asross
Last active May 10, 2016 20:20
Show Gist options
  • Save asross/65077e4237f43692f519794fe171b768 to your computer and use it in GitHub Desktop.
Save asross/65077e4237f43692f519794fe171b768 to your computer and use it in GitHub Desktop.
Attempt at demonstrating OrderSet chemotherapy regimen timing using as few extensions as possible
<OrderSet>
<moduleMetadata>
<identifier>
<system value="http://nccn.org/ordertemplates" />
<value value="KDN5" />
</identifier>
</module>
<!-- Here we only have one course (which repeats for 6 21-day cycles), but we could have multiple courses -->
<action>
<title value="Course 1: Gemcitabine and Carboplatin"/>
<actionIdentifier><value value="#course-1"/></actionIdentifier>
<!-- Here's the only extension: cycle, which just uses regular Timing -->
<extension url="http://example.com/fhir/cycle">
<timing>
<repeat>
<count value="6" />
<period value="21" />
<periodUnit value="d" />
</repeat>
</timing>
</extension>
<!-- Cycle sub-actions -->
<action>
<!-- Gemcitabine sub-action -->
<action>
<title value="Gemcitabine 1250 mg/m2 IV over 30 minutes on Days 1 and 8"/>
<resource>
<reference value="#gemcitabine-order"/>
</resource>
<relatedAction>
<!-- The offset is relative to the course, but implicitly, it's relative to each cycle -->
<!-- Could also have a special actionIdentifier that represents "each cycle", e.g. "#course-1-cycle" -->
<actionIdentifier><value value="#course-1"/></actionIdentifier>
<anchor value="start"/>
</relatedAction>
</action>
<!-- Carboplatin sub-action. NOTE: I changed this to day 2 to demonstrate offseting -->
<action>
<title value="Carboplatin AUC 5 IV over 30 minutes on Day 2"/>
<resource>
<reference value="#carboplatin-order"/>
</resource>
<relatedAction>
<actionIdentifier><value value="#course-1"/></actionIdentifier>
<anchor value="start"/>
<offset>
<value value="1"/>
<unit value="d"/>
</offset>
</relatedAction>
</action>
</action>
</action>
<!-- Contained MedicationOrders referenced in the sub-actions -->
<contained>
<!-- Gemcitabine has a repeat; happens twice, separated by a week -->
<MedicationOrder>
<id value="gemcitabine-order"/>
<dosageInstruction>
<text value="1250 mg/m² IV over 30 minutes on days 1 and 8" />
<doseQuantity>
<value value="1250" />
<unit value="mg/m²" />
</doseQuantity>
<route>
<text value="IV" />
</route>
<timing>
<repeat>
<count value="2"/>
<period value="7"/>
<periodUnit value="d"/>
<duration value="30" />
<durationUnit value="min" />
</repeat>
</timing>
</dosageInstruction>
</MedicationOrder>
<!-- Carboplatin has no repeat; happens only once -->
<MedicationOrder>
<id value="carboplatin-order"/>
<dosageInstruction>
<text value="CARBOplatin AUC 5 IV over 30 minutes on Day 2" />
<doseQuantity>
<value value="5" />
<unit value="AUC" />
</doseQuantity>
<route>
<text value="IV" />
</route>
<timing>
<repeat>
<count value="1"/>
<duration value="30" />
<durationUnit value="min" />
</repeat>
</timing>
</dosageInstruction>
</MedicationOrder>
</contained>
</OrderSet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment