<?xml version="1.0" encoding="UTF-8"?>

<MedicationDispense xmlns="http://hl7.org/fhir">
  <id value="meddisp0312"/>
  <contained>
    <Medication>
      <id value="med0309"/>
      <code>
        <coding>
          <system value="http://hl7.org/fhir/sid/ndc"/>
          <code value="50580-608-02"/>
          <display value="Tylenol PM Extra Strength, 1 BOTTLE in 1 CARTON (50580-608-02) &gt; 100 TABLET, FILM COATED in 1 BOTTLE (package)"/>
        </coding>
        <text value="Tylenol PM"/>
      </code>
    </Medication>
  </contained>
  <status value="on-hold"/>
  <medication>
    <!-- Linked to a RESOURCE Medication -->
    <reference>
      <reference value="#med0309"/>
      <display value="Tylenol PM Extra Strength, 1 BOTTLE in 1 CARTON (50580-608-02) &gt; 100 TABLET, FILM COATED in 1 BOTTLE (package)"/>
    </reference>
  </medication>
  <subject>
    <reference value="Patient/pat1"/>
    <display value="Donald Duck"/>
  </subject>
  <performer>
    <actor>
      <reference value="Practitioner/f006"/>
    </actor>
  </performer>
  <authorizingPrescription>
    <reference value="MedicationRequest/medrx0310"/>
  </authorizingPrescription>
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
      <code value="FF"/>
      <display value="First Fill"/>
    </coding>
  </type>
  <quantity>
    <value value="100"/>
    <system value="http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm"/>
    <code value="TAB"/>
  </quantity>
  <daysSupply>
    <value value="30"/>
    <unit value="Day"/>
    <system value="http://unitsofmeasure.org"/>
    <code value="d"/>
  </daysSupply>
  <whenPrepared value="2015-01-15T10:20:00Z"/>
  <whenHandedOver value="2015-01-15T16:20:00Z"/>
  <dosageInstruction>
    <step>
      <component>
        <text value="Take 1-2 tablets once daily at bedtime as needed for restless legs"/>
        <additionalInstruction>
          <text value="Take at bedtime"/>
        </additionalInstruction>
        <timing>
          <repeat>
            <frequency value="1"/>
            <period value="1"/>
            <periodUnit value="d"/>
          </repeat>
        </timing>
        <asNeededFor>
          <coding>
            <system value="http://snomed.info/sct"/>
            <code value="32914008"/>
            <display value="Restless Legs"/>
          </coding>
        </asNeededFor>
        <route>
          <coding>
            <system value="http://snomed.info/sct"/>
            <code value="26643006"/>
            <display value="Oral Route"/>
          </coding>
        </route>
        <doseAndRate>
          <type>
            <coding>
              <system value="http://terminology.hl7.org/CodeSystem/dose-rate-type"/>
              <code value="ordered"/>
              <display value="Ordered"/>
            </coding>
          </type>
          <doseRange>
            <low>
              <value value="1"/>
              <unit value="TAB"/>
              <system value="http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm"/>
              <code value="TAB"/>
            </low>
            <high>
              <value value="2"/>
              <unit value="TAB"/>
              <system value="http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm"/>
              <code value="TAB"/>
            </high>
          </doseRange>
        </doseAndRate>
      </component>
    </step>
  </dosageInstruction>
</MedicationDispense>