<?xml version=“1.0” encoding=“UTF-8”?> <MedicationDispense xmlns=“hl7.org/fhir”>

  <id value="meddisp0315"/>
  <meta>
  <security>
    <system value="http://terminology.hl7.org/CodeSystem/v3-ActReason"/>
    <code value="HTEST"/>
    <display value="test health data"/>
  </security>
</meta>
<contained>
      <Medication>
          <id value="med0314"/>
          <code>
              <coding>
                  <system value="http://www.nlm.nih.gov/research/umls/rxnorm"/>
                  <code value="562721"/>
                  <display value="Alprazolam 0.25mg (Xanax)"/>
              </coding>
          </code>
      </Medication>
  </contained>
  <status value="in-progress"/>
  <medicationReference>
      <!--   Linked to a RESOURCE Medication   -->
      <reference value="#med0314"/>
      <display value="Alprazolam 0.25mg (Xanax)"/>
  </medicationReference>
  <subject>
      <reference value="Patient/pat1"/>
      <display value="Donald Duck "/> 
  </subject>
  <performer>
      <actor>
          <reference value="Practitioner/f006"/>
      </actor>
  </performer>
  <authorizingPrescription>
      <reference value="MedicationRequest/medrx0305"/>
  </authorizingPrescription>
  <type>
      <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode"/>
          <code value="RFP"/>
          <display value="Refill - Part Fill"/>
      </coding>
  </type>
  <quantity>
      <value value="30"/>
      <system value="http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm"/>
      <code value="TAB"/>
  </quantity>
  <daysSupply>
      <value value="10"/>
      <unit value="Day"/>
      <system value="http://unitsofmeasure.org"/>
      <code value="d"/>
  </daysSupply>
  <whenPrepared value="2015-06-25T07:13:00+05:00"/>
  <whenHandedOver value="2015-06-26T07:13:00+05:00"/>
  <dosageInstruction>
      <sequence value="1"/>
      <text value="0.25mg PO every 6-12 hours as needed for menses from Jan 15-20, 2015.  Do not exceed more than 4mg per day"/>
      <additionalInstruction>
          <coding>
              <system value="http://snomed.info/sct"/>
              <code value="418914006"/>
              <display value="Warning. May cause drowsiness. If affected do not drive or operate machinery. Avoid alcoholic drink (qualifier value)"/>
          </coding>
      </additionalInstruction>
      <timing>
          <repeat>
              <boundsPeriod>
                  <start value="2015-01-15"/>
                  <end value="2015-01-20"/>
              </boundsPeriod>
              <frequency value="1"/>
              <period value="6"/>
              <periodMax value="12"/>
              <periodUnit value="h"/>
          </repeat>
      </timing>
      <asNeededCodeableConcept>
          <coding>
              <system value="http://snomed.info/sct"/>
              <code value="266599000"/>
              <display value="Dysmenorrhea (disorder)"/>
          </coding>
      </asNeededCodeableConcept>
      <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>
          <doseQuantity>
              <value value="1"/>
              <unit value="TAB"/>
              <system value="http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm"/>
              <code value="TAB"/> 
          </doseQuantity>
      </doseAndRate>

  </dosageInstruction>

</MedicationDispense>