MedicationDispense (Clinician) Profile Example

<MedicationDispense xmlns="http://hl7.org/fhir">
    <id value="medicationdispense-clin-example" />
    <contained>
        <DetectedIssue>
            <!-- The Identifier was the ID of the detectedIssue monograph in instatiation/detectedIssueDefinition in the CeRX message, there may be some issues with duplicate identifiers if the ID is not unique across all IDs stored in the local DIS -->
            <id value="#detectedIssue2354" />
            <!-- carrying over "active" or "completed" will cause an issue in FHIR connformance, assumed that the value of "unknown" could be populated by the converter in these types of cases -->
            <status value="unknown" />
            <detail value="The patient has an intolerance to iron oxide found in Almotriptan malate 6.25mg" />
            <mitigation>
                <action>
                    <coding>
                        <!-- Implementation consideration: we know PEI uses v3-ActCode for this value but it's not communicated in any of the structured data of the test message -->
                        <system value="http://terminology.hl7.org/CodeSystem/v3-ActCode" />
                        <code value="5" />
                        <!-- In order to be meaningful to patients, the converter will likely need to create a display based on the value provided (5= consulted provider) -->
                    </coding>
                </action>
                <date value="2003-12-01T10:01:01-03:00" />
                <author>
                    <reference value="Practitioner/555555" />
                    <display value="Tech Timmy" />
                </author>
            </mitigation>
        </DetectedIssue>
    </contained>
    <!-- narrative removed for simplicity -->
    <identifier>
        <value value="987654321" />
    </identifier>
    <status value="completed" />
    <medicationCodeableConcept>
        <coding>
            <system value="http://hl7.org/fhir/NamingSystem/ca-hc-din" />
            <code value="02466821" />
            <display value="ALMOTRIPTAN (almotriptan (almotriptan malate) 12.5 mg oral tablet)" />
        </coding>
    </medicationCodeableConcept>
    <subject>
        <reference value="Patient/999999999" />
    </subject>
    <performer>
        <actor>
            <reference value="Practitioner/888888" />
        </actor>
    </performer>
    <location>
        <reference value="Location/123445" />
    </location>
    <authorizingPrescription>
        <reference value="MedicationRequest/222222" />
    </authorizingPrescription>
    <type>
        <coding>
            <!-- while the value comes from v3-ActPharmacySupplyType, the OID was not communicated in the test message and is therefore commented out
       <system value="http://hl7.org/fhir/ValueSet/v3-ActPharmacySupplyType"/>  -->
            <code value="FF" />
            <display value="First Fill" />
        </coding>
    </type>
    <quantity>
        <value value="250" />
        <unit value="mg" />
    </quantity>
    <daysSupply>
        <value value="30" />
        <unit value="d" />
    </daysSupply>
    <dosageInstruction>
        <sequence value="1" />
        <text value="Take 12.5 mg PO at onset; may repeat once after 2 hours. Not to exceed 25 mg/day. This medication is intended to address Migraines at onset. If you experience Migraines for more than 10 days/month, consult your doctor." />
        <timing>
            <repeat>
                <boundsPeriod>
                    <start value="2004-01-01" />
                    <end value="2004-01-31" />
                </boundsPeriod>
            </repeat>
        </timing>
        <route>
            <coding>
                <!-- This system value is made up because one could not be found for gCRT which is identifier as 2.16.840.1.113883.4.80 in the CeRX message -->
                <system value="http://terminology.hl7.org/CodeSystem/v3-GCRT" />
                <code value="3" />
            </coding>
        </route>
        <doseAndRate>
            <doseQuantity>
                <value value="6.25" />
                <unit value="mg" />
            </doseQuantity>
        </doseAndRate>
        <maxDosePerPeriod>
            <numerator>
                <value value="25" />
                <unit value="mg" />
            </numerator>
            <denominator>
                <value value="1" />
                <unit value="day" />
            </denominator>
        </maxDosePerPeriod>
    </dosageInstruction>
    <substitution>
        <wasSubstituted value="false" />
        <type>
            <coding>
                <code value="N" />
                <!-- While an OID for ActSubstanceAdminSubstitutionCode value set isnt present in the CeRX message, some means of identifying the system is critical for delivering meaning (display value) to patients -->
            </coding>
        </type>
        <reason>
            <coding>
                <code value="OS" />
                <display value="Out of Stock" />
            </coding>
        </reason>
        <responsibleParty>
            <reference value="Practitioner/2356" />
        </responsibleParty>
    </substitution>
    <!-- <?xml version="1.0" encoding="UTF-8"?>
   <PORX_IN060220CA xmlns="urn:hl7-org:v3" xmlns:gsd="http://aurora.regenstrief.org/GenericXMLSchema" xmlns:sch="http://www.ascc.net/xml/schematron" xmlns:xlink="http://www.w3.org/TR/WD-xlink" xmlns:ex="urn:hl7-org/v3-example" xmlns:mif="urn:hl7-org:v3/mif" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 ../../schemas/mergedschemas/PORX_IN060220CA.xsd" ITSVersion="XML_1.0">
     <id root="2.16.124.9.101.1.1.1" extension="122"/>
     <creationTime value="20050101102001"/>
     <versionCode code="V3-2005-05"/>
     <interactionId root="2.16.840.1.113883.1.6" extension="PORX_IN060220CA"/>
     <processingCode code="P"/>
     <processingModeCode code="T"/>
     <acceptAckCode code="ER"/>
     <receiver>
       <telecom use="WP" value="uri:198.203.1.21"/>
       <device>
         <id root="2.16.124.9.101.1.8"/>
       </device>
     </receiver>
     <sender>
       <telecom use="H" value="uri:198.203.1.23"/>
       <device>
         <id root="2.16.124.9.101.1.1"/>
         <name>PEI DIS</name>
       </device>
     </sender>
     <acknowledgement>
           <typeCode code="AA"/>
       <targetMessage>
         <id root="2.16.124.9.101.1.8.1" extension="122"/>
       </targetMessage>
     </acknowledgement>
     <controlActEvent>
       <id root="2.16.124.9.101.1.1.17" extension="1245"/>
       <code code="PORX_TE060030UV"/>
       <statusCode nullFlavor="NA"/>
       <subject contextConductionInd="false">
         <medicationDispense>
           <id root="2.16.124.9.101.1.1.3" extension="987654321"/>
           <statusCode code="COMPLETE"/>
           <responsibleParty>
             <assignedPerson>
               <id root="2.16.840.1.113883.4.15" extension="777777"/>
               <representedPerson>
                 <name use="L">
                   <given>Sue</given>
                   <family>Script</family>
                 </name>
               </representedPerson>
             </assignedPerson>
           </responsibleParty>
           <performer typeCode="PRF">
             <assignedPerson>
               <id root="2.16.840.1.113883.4.76" extension="888888"/>
               <representedPerson>
                 <name use="L">
                   <given>Robert</given>
                   <family>Technician</family>
                 </name>
               </representedPerson>
             </assignedPerson>
           </performer>
           <location>
             <serviceDeliveryLocation>
               <id root="2.16.840.1.113883.4.19" extension="123445"/>
               <addr>
                 <city>Charlottetown</city>
                 <state>PE</state>
                 <postalCode>C1A5M7</postalCode>
                 <country>Canada</country>
               </addr>
               <telecom use="H" value="tel:9023457823"/>
               <location>
                 <name>Shopper's Drug Mart</name>
               </location>
             </serviceDeliveryLocation>
           </location>
           <inFulfillmentOf>
             <substanceAdministrationRequest>
               <id root="2.16.124.9.101.1.1.4" extension="222222"/>
               <code code="DRUG"/>
               <author>
                 <time value="20050101101101"/>
                 <assignedPerson>
                   <id root="2.16.840.1.113883.4.14" extension="123456"/>
                   <code code="DR"/>
                   <representedPerson>
                     <name>
                         <family>Ramoray</family>
                         <given>Drake</given>
                     </name>
                   </representedPerson>
                 </assignedPerson>
               </author>
             </substanceAdministrationRequest>
           </inFulfillmentOf>
           <component1>
             <dosageInstruction moodCode="EVN">
               <code code="DRUG"/>
               <text>Take 12.5 mg PO at onset; may repeat once after 2 hours. Not to exceed 25 mg/day. This medication is intended to address Migraines at onset. If you experience Migraines for more than 10 days/month, consult your doctor.</text>
               <effectiveTime>
                 <low value="20040101"/>
                 <high value="20040131"/>
               </effectiveTime>
               <routeCode code="3" codeSystem="2.16.840.1.113883.4.80"/>
               <maxDoseQuantity>
                 <numerator value="25" unit="mg"/>
                 <denominator value="1" unit="day"/>
               </maxDoseQuantity>
               <administrationUnitCode code="PUFF"/>
               <consumable>
                 <medication3>
                   <player>
                     <code code="02466821" codeSystem="2.16.840.1.113883.5.1105"/>
                     <name>ALMOTRIPTAN (almotriptan (almotriptan malate) 12.5 mg oral tablet)</name>
                      <desc>A concoction of this and that</desc>
                         <formCode code="SZ" codeSystem="2.16.840.1.113883.4.79"/>
                      <lotNumberText>2145</lotNumberText>
                      <expirationTime>
                        <width unit="d" value="30"/>
                      </expirationTime>
                      <asContent>
                          <quantity value="250" unit="mg"/>
                         <containerPackagedMedicine>
                           <formCode code="COMPPKG"/>
                         </containerPackagedMedicine>
                      </asContent>
                     <ingredient negationInd="false">
                       <quantity value="90" unit="%"/>
                       <ingredient>
                         <code code="134529000" codeSystem="2.16.840.1.113883.2.20.3.251"/>
                         <name>Name of the Ingredient</name>
                       </ingredient>
                     </ingredient>
                   </player>
                 </medication3>
               </consumable>
               <component1>
                 <supplementalInstruction moodCode="EVN">
                   <text>Can be taken on an empty stomach</text>
                 </supplementalInstruction>
               </component1>
               <component2>
                 <sequenceNumber value="1"/>
                 <dosageLine moodCode="EVN">
                   <doseQuantity value="6.25" unit="mg"/>
                   <text>A free form description of how the dispensed medication is to be administered to the patient</text>
                 </dosageLine>
               </component2>
             </dosageInstruction>
           <component2>
             <substitutionMade>
               <code code="N"/>
               <statusCode code="completed"/>
               <reasonCode code="OS"/>
               <responsibleParty>
                 <agent>
                   <id root="2.16.840.1.113883.4.15" extension="2356"/>
                 </agent>
               </responsibleParty>
             </substitutionMade>
           </component2>
           <component3>
             <supplyEvent>
               <code code="FF"/>
               <effectiveTime>
                   <low value="20040101"/>
                   <high nullFlavor="NA"/>
               </effectiveTime>
               <quantity value="250" unit="mg"/>
               <expectedUseTime>
                 <width unit="d" value="30"/>
               </expectedUseTime>
               <product>
                 <medication>
                   <player>
                     <code code="02466821" codeSystem="2.16.840.1.113883.5.1105"/>
                     <name>ALMOTRIPTAN (almotriptan (almotriptan malate) 12.5 mg oral tablet)</name>
                      <desc>A concoction of this and that</desc>
                      <formCode code="PILL"/>
                      <lotNumberText>2145</lotNumberText>
                      <expirationTime>
                        <width unit="d" value="30"/>
                      </expirationTime>
                      <asContent>
                          <quantity value="250.0" unit="mg"/>
                         <containerPackagedMedicine>
                           <formCode code="COMPPKG"/>
                         </containerPackagedMedicine>
                      </asContent>
                   </player>
                 </medication>
               </product>
             </supplyEvent>
           </component3>
           <subjectOf1>
             <controlActEvent>
               <id></id>
               <code></code>
               <statusCode></statusCode>
               <effectiveTime></effectiveTime>
               <reasonCode></reasonCode>
               <responsibleParty>
                 <assignedPerson>
                   <id></id>
                   <representedPerson>
                     <name></name>
                   </representedPerson>
                 </assignedPerson>
               </responsibleParty>
               <author>
                 <time></time>
                 <assignedPerson>
                   <id></id>
                   <representedPerson>
                     <name></name>
                   </representedPerson>
                 </assignedPerson>
               </author>
             </controlActEvent>
           </subjectOf1>
           <subjectOf2>
             <detectedIssueEvent>
               <code code="INT"/>
               <text>The patient has an intolerance to iron oxide found in Almotriptan malate 6.25mg</text>
               <statusCode code="active"/>
               <priorityCode code="W"/>
               <subject>
                 <substanceAdministration moodCode="">
                   <id root="2.16.124.9.101.1.1.4" extension="11111"/>
                   <code code="DRUG"/>
                   <statusCode code="active"/>
                   <effectiveTime>
                      <low value="20031101"/>
                      <high value="20031130"/>
                   </effectiveTime>
                   <doseQuantity value="6.25" unit="mg"/>
                   <consumable>
                     <medication>
                       <player determinerCode="KIND">
                         <code code="02405792" codeSystem="2.16.840.1.113883.5.1105"/>
                         <name>ALMOTRIPTAN (almotriptan (almotriptan malate) 6.25 mg oral tablet)</name>
                       </player>
                     </medication>
                   </consumable>
                 </substanceAdministration>
               </subject>
               <subject>
                 <supplyEvent>
                   <id root="2.16.124.9.101.1.1.3" extension="121111"/>
                   <statusCode code="completed"/>
                   <effectiveTime>
                     <high value="20031101"/>
                   </effectiveTime>
                   <product>
                     <medication>
                       <player determinerCode="KIND">
                         <code code="02405792" codeSystem="2.16.840.1.113883.5.1105"/>
                         <name>ALMOTRIPTAN (almotriptan (almotriptan malate) 6.25 mg oral tablet)</name>
                       </player>
                     </medication>
                   </product>
                   <location>
                     <serviceDeliveryLocation>
                       <id root="2.16.840.1.113883.4.19" extension="123445"/>
                       <addr>
                         <city>Charlottetown</city>
                         <state>PE</state>
                         <postalCode>C1A5M7</postalCode>
                         <country>Canada</country>
                       </addr>
                       <telecom use="WP" value="tel:9023457823"/>
                       <location>
                         <name>Shopper's Drug Mart</name>
                       </location>
                     </serviceDeliveryLocation>
                   </location>
                 </supplyEvent>
               </subject>
               <instantiation>
                 <detectedIssueDefinition>
                   <id root="2.16.124.9.101.1.1.16" extension="2354"/>
                   <author>
                     <assignedEntity>
                       <assignedOrganization>
                         <name>FDB</name>
                       </assignedOrganization>
                     </assignedEntity>
                   </author>
                 </detectedIssueDefinition>
               </instantiation>
               <mitigatedBy>
                 <detectedIssueManagement>
                   <code code="5"/>
                   <text>The 6.25mg dose pill included iron oxide which the patient was allergic to. The provider was consulted and issued a new prescription for the 12.5mg dose pill that does not include iron oxide. Patient was informed that they can not exceed 25mg/day</text>
                   <statusCode code="active"/>
                   <author>
                     <time value="20031201100101"/>
                     <assignedPerson>
                       <id root="2.16.840.1.113883.4.76" extension="555555"/>
                       <representedPerson>
                         <name use="L">
                           <given>Tech</given>
                           <family>Timmy</family>
                         </name>
                       </representedPerson>
                     </assignedPerson>
                   </author>
                 </detectedIssueManagement>
               </mitigatedBy>
               <subjectOf>
                 <severityObservation>
                   <code code="SEV"/>
                   <statusCode code="completed"/>
                   <value code="M"/>
                 </severityObservation>
               </subjectOf>
             </detectedIssueEvent>
           </subjectOf2>
           <subjectOf3>
             <annotation>
               <text>Some textual observation about the dispense by the dispenser</text>
               <statusCode code="active"/>
               <languageCode code="EN"/>
               <author>
                 <time value="20040101090101"/>
                 <assignedPerson>
                   <id root="2.16.840.1.113883.4.15" extension="777777"/>
                   <representedPerson>
                     <name use="L">
                       <given>Sue</given>
                       <family>Script</family>
                     </name>
                   </representedPerson>
                 </assignedPerson>
               </author>
             </annotation>
           </subjectOf3>
           <subjectOf4>
             <subsetCode code="SUM"></subsetCode>
             <detectedIssueIndicator>
               <statusCode code="completed"></statusCode>
             </detectedIssueIndicator>
           </subjectOf4>
           <subjectOf5>
             <subsetCode code="SUM"></subsetCode>
             <annotationIndicator>
               <statusCode code="completed"></statusCode>
             </annotationIndicator>
           </subjectOf5>
         </medicationDispense>
       </subject>
       <subjectOf>
         <detectedIssueEvent>
           <code></code>
           <statusCode></statusCode>
           <priorityCode></priorityCode>
           <subjectOf>
             <severityObservation>
               <code></code>
               <statusCode></statusCode>
               <value></value>
             </severityObservation>
           </subjectOf>
         </detectedIssueEvent>
       </subjectOf>
       <queryAck>
         <queryId root="2.16.124.9.101.1.2.5" extension="123"/>
         <queryResponseCode code="OK"/>
         <resultTotalQuantity value="1"/>
         <resultCurrentQuantity value="1"/>
         <resultRemainingQuantity value="0"/>
       </queryAck>
       <queryByParameter>
         <queryId root="2.16.124.9.101.1.8.5" extension="123"/>
         <parameterList>
           <includeIssuesIndicator>
             <value value="false"/>
           </includeIssuesIndicator>
           <includeNotesIndicator>
             <value value="false"/>
           </includeNotesIndicator>
           <patientBirthDate>
             <value value="19670405"/>
           </patientBirthDate>
           <patientGender>
             <value code="F"/>
           </patientGender>
           <patientID>
             <value root="2.16.840.1.113883.4.13" extension="999999999"/>
           </patientID>
           <patientName>
             <value>
               <given>Patti</given>
               <family>Patient</family>
             </value>
           </patientName>
           <prescriptionDispenseNumber>
             <value root="2.16.124.9.101.1.1.3" extension="987654321"/>
           </prescriptionDispenseNumber>
         </parameterList>
       </queryByParameter>
     </controlActEvent>
   </PORX_IN060220CA> -->
</MedicationDispense>

Original CeRX Message

<?xml version="1.0" encoding="UTF-8"?>
<PORX_IN060220CA xmlns="urn:hl7-org:v3" xmlns:gsd="http://aurora.regenstrief.org/GenericXMLSchema" xmlns:sch="http://www.ascc.net/xml/schematron" xmlns:xlink="http://www.w3.org/TR/WD-xlink" xmlns:ex="urn:hl7-org/v3-example" xmlns:mif="urn:hl7-org:v3/mif" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 ../../schemas/mergedschemas/PORX_IN060220CA.xsd" ITSVersion="XML_1.0">
	<id root="2.16.124.9.101.1.1.1" extension="122"/>
	<creationTime value="20050101102001"/>
	<versionCode code="V3-2005-05"/>
	<interactionId root="2.16.840.1.113883.1.6" extension="PORX_IN060220CA"/>
	<processingCode code="P"/>
	<processingModeCode code="T"/>
	<acceptAckCode code="ER"/>
	<receiver>
		<telecom use="WP" value="uri:198.203.1.21"/>
		<device>
			<id root="2.16.124.9.101.1.8"/>
		</device>
	</receiver>
	<sender>
		<telecom use="H" value="uri:198.203.1.23"/>
		<device>
			<id root="2.16.124.9.101.1.1"/>
			<name>PEI DIS</name>
		</device>
	</sender>
	<acknowledgement>
		<typeCode code="AA"/>
		<targetMessage>
			<id root="2.16.124.9.101.1.8.1" extension="122"/>
		</targetMessage>
	</acknowledgement>
	<controlActEvent>
		<id root="2.16.124.9.101.1.1.17" extension="1245"/>
		<code code="PORX_TE060030UV"/>
		<statusCode nullFlavor="NA"/>
		<subject contextConductionInd="false">
			<medicationDispense>
				<id root="2.16.124.9.101.1.1.3" extension="987654321"/>
				<statusCode code="COMPLETE"/>
				<!-- optionally the represented person - the supervisor pharmacist -->
				<responsibleParty>
					<assignedPerson>
						<!-- pharmacist or prescriber id- in original test message the OID was set to Special Authorization Identifier (2.16.124.9.101.1.1.7) we believe this was an oversight -->
						<id root="2.16.840.1.113883.4.15" extension="777777"/>
						<representedPerson>
							<name use="L">
								<given>Sue</given>
								<family>Script</family>
							</name>
						</representedPerson>
					</assignedPerson>
				</responsibleParty>
				<!--  the pharmacist or pharm tech - in original test message the OID was set to Special Authorization Identifier (2.16.124.9.101.1.1.7) we believe this was an oversight-->
				<performer typeCode="PRF">
					<assignedPerson>
						<!-- pharmacist or prescriber id  -->
						<id root="2.16.840.1.113883.4.76" extension="888888"/>
						<representedPerson>
							<name use="L">
								<given>Robert</given>
								<family>Technician</family>
							</name>
						</representedPerson>
					</assignedPerson>
				</performer>
				<!-- Indicates the service delivery location where the drug was dispensed -->
				<location>
					<serviceDeliveryLocation>
						<!-- a pharmacy id - in original test message the OID was set to Adjudicated Invoice Group Identiifer (2.16.124.9.101.1.1.2) we believe this was an oversight -->
						<id root="2.16.840.1.113883.4.19" extension="123445"/>
						<addr>
							<city>Charlottetown</city>
							<state>PE</state>
							<postalCode>C1A5M7</postalCode>
							<country>Canada</country>
						</addr>
						<telecom use="H" value="tel:9023457823"/>
						<location>
							<name>Shopper's Drug Mart</name>
						</location>
					</serviceDeliveryLocation>
				</location>
				<!-- optionally Indicates the prescription that is being dispensed against -->
				<inFulfillmentOf>
					<substanceAdministrationRequest>
						<!-- The identifier of the prescription for which a dispense is being created. The ID is only 'populated' because in some cases the prescription will not yet exist electronically  -->
						<id root="2.16.124.9.101.1.1.4" extension="222222"/>
						<code code="DRUG"/>
						<!-- optional identification of the prescriber -->
						<author>
							<time value="20050101101101"/>
							<assignedPerson>
								<id root="2.16.840.1.113883.4.14" extension="123456"/>
								<!--  HealthcareProviderRoleType -->
								<code code="DR"/>
								<representedPerson>
									<name>
										<family>Ramoray</family>
										<given>Drake</given>
									</name>
								</representedPerson>
							</assignedPerson>
						</author>
					</substanceAdministrationRequest>
				</inFulfillmentOf>
				<component1>
					<dosageInstruction moodCode="RQO">
						<!-- Distinguishes types of dosage : For SNOMED this will pre-coordinate route, body site and potentially drug.  For non-SNOMED, this will be a fixed value of DRUG. -->
						<code code="DRUG"/>
						<!-- required value free form textual specification made up of either an 'Ad-hoc dosage instruction' or 'Textual rendition of the structured dosage lines', plus route, dosage unit, and other pertinent administration information specified by the provider -->
						<text>Take 12.5 mg PO at onset; may repeat once after 2 hours. Not to exceed 25 mg/day. This medication is intended to address Migraines at onset. If you experience Migraines for more than 10 days/month, consult your doctor.</text>
			<effectiveTime>
							<low value="20040101"/>
							<high value="20040131"/>
			</effectiveTime>
			<!-- Implementation Variance PEI: This is the means by which the dispensed drug is to be administered to the patient :  use GCRT - Route of Administration Code - 2.16.840.1.113883.4.80 instead of HL7 RouteOfAdministration vocab -->
					<routeCode code="3" codeSystem="2.16.840.1.113883.4.80"/>
						<maxDoseQuantity>
							<numerator value="25" unit="mg"/>
							<denominator value="1" unit="day"/>
						</maxDoseQuantity>
						<!-- Identifies how the drug is measured for administration.  Specified when not implicit from the drug form  (e.g. puff, inhalation, drops, etc.). AdministrableDrugForm vocab -->
						<administrationUnitCode code="PUFF"/>
						<!-- Identification of drug product that the instruction pertains to. The drug only needs to be specified if the administration instruction corresponds to one part of the overall product. For example, referring to the administration of a particular product from a combo-pack -->
			<consumable>
							<medication3>
								<player>
									<code code="02466821" codeSystem="2.16.840.1.113883.5.1105"/>
									<name>ALMOTRIPTAN (almotriptan (almotriptan malate) 12.5 mg oral tablet)</name>
									<!-- A free form textual description of a drug. This usually is only populated for custom compounds, providing instructions on the composition and creation of the compound but was included in this example message to provide additional detail. -->
									<desc>A concoction of this and that</desc>
									<!-- Implementation Variance PEI: For formCode in medication3- Use GCDF - Dosage Form Code - 2.16.840.1.113883.4.79 instead of HL7 OrderableDrugForm vocab -->
									<formCode code="SZ" codeSystem="2.16.840.1.113883.4.79"/>
									<lotNumberText>2145</lotNumberText>
									<expirationTime>
										<width unit="d" value="30"/>
									</expirationTime>
									<asContent>
										<quantity value="250" unit="mg"/>
											<containerPackagedMedicine>
												<!-- A coded value denoting a specific kind of a container. Used to identify a requirement for a particular type of compliance packaging: CompliancePackageEntityType vocab -->
												<formCode code="COMPPKG"/>
											</containerPackagedMedicine>
									</asContent>
									<!-- can be up to 10 ingredients here - presumably, this would be for compounds -->
									<ingredient negationInd="false">
										<quantity value="90" unit="%"/>
										<ingredient>
											<!-- The unique identifier for the drug or chemical.  ActiveIngredientDrugEntityType -->
											<code code="134529000" codeSystem="2.16.840.1.113883.2.20.3.251"/>
											<name>Name of the Ingredient</name>
										</ingredient>
									</ingredient>
								</player>
							</medication3>
						</consumable>
						<component1>
							<supplementalInstruction moodCode="RQO">
								<text>Can be taken on an empty stomach</text>
							</supplementalInstruction>
						</component1>
						<!-- 0..20 elements for dosage lines. This information, along with the order/sequence of the dosage lines,  constitutes the details of a structured dosage instruction. Enables SIG instructions to be discretely specified - PEI will store the entire structure verabatim.-->
						<component2>
							<sequenceNumber value="1"/>
							<dosageLine moodCode="RQO">
								<doseQuantity value="6.25" unit="mg"/>
								<text>A free form description of how the dispensed medication is to be administered to the patient</text>
								<!-- more elements - but PEI will not parse the individual elements, they'll store the entire xml structure -->
							</dosageLine>
						</component2>
					</dosageInstruction>
						<!-- This is the component2 that relates to substitution -->
				<component2>
					<substitutionMade>
						<code code="N"/> <!-- eg n - no substitution was done -->
						<!-- required : fixed value of completed -->
						<statusCode code="completed"/>
						<!--optional value to indicate the reason for the substitution of (or lack of substitution) from what was prescribed : SubstanceAdminSubstitutionReason -->
						<reasonCode code="OS"/> <!-- OS - indicates out of stock -->
						<responsibleParty>
							<agent>
								<id root="2.16.840.1.113883.4.15" extension="2356"/>
							</agent>
						</responsibleParty>
					</substitutionMade>
				</component2>
				<component3>
					<supplyEvent>
						<!-- Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc. ActPharmacySupplyType vocab -->
						<code code="FF"/>
						<effectiveTime>
							<low value="20040101"/>
							<high nullFlavor="NA"/>
						</effectiveTime>
						<quantity value="250" unit="mg"/>
						<!-- The number of days that the overall prescribed item is expected to last, if the patient is compliant with the dispensing and administration of the prescription. Used to specify a total authorization as a duration rather than a quantity with refills. E.g. dispense 30 at a time, refill for 1 year. May also be sent as an  estimate of the expected overall duration of the prescription based on the quantity prescribed. This attribute is mandatory because the prescriber (in discussion with the patient) has a better understanding of the days supply needed by the patient-->
						<expectedUseTime>
							<width unit="d" value="30"/>
						</expectedUseTime>
						<product>
							<medication>
								<player>
									<code code="02466821" codeSystem="2.16.840.1.113883.5.1105"/>
									<name>ALMOTRIPTAN (almotriptan (almotriptan malate) 12.5 mg oral tablet)</name>
									<desc>A concoction of this and that</desc>
									<!-- Indicates the form in which the drug product must be, or has been manufactured or custom prepared. OrderableDrugForm vocab -->
									<formCode code="PILL"/>
									<lotNumberText>2145</lotNumberText>
									<expirationTime>
										<width unit="d" value="30"/>
									</expirationTime>
									<asContent>
										<quantity value="250.0" unit="mg"/>
											<containerPackagedMedicine>
												<!-- A coded value from CompliancePackageEntityType vocab -->
												<formCode code="COMPPKG"/>
											</containerPackagedMedicine>
									</asContent>
								</player>
							</medication>
						</product>
					</supplyEvent>
				</component3>
				<!-- 0..20 elements to show how the status of the dispense has changed over time i.e. one element for every controlActEvent of every message that updated this entity  -->
				<subjectOf1>
					<controlActEvent>
						<!-- <id></id> -->
						<code></code>
						<statusCode></statusCode>
						<effectiveTime></effectiveTime>
						<reasonCode></reasonCode>
						<responsibleParty>
							<assignedPerson>
								<id></id>
								<representedPerson>
									<name></name>
								</representedPerson>
							</assignedPerson>
						</responsibleParty>
						<author>
							<time></time>
							<assignedPerson>
								<id></id>
								<representedPerson>
									<name></name>
								</representedPerson>
							</assignedPerson>
						</author>
					</controlActEvent>
				</subjectOf1>
				<!-- 0..50 elements to describe the issues -->
				<subjectOf2>
					<!--This is an example of an intolerance to an ingredient specific to the 6.25mg dose version of the same medication from a prior prescription  -->
					<detectedIssueEvent>
						<!-- ActDetectedIssueCode vocab: A coded value that is used to distinguish between different kinds of issues INT indicates intolerance alert-->
						<code code="INT"/>
						<!-- An optional free form textual description of a detected issue -->
						<text>The patient has an intolerance to iron oxide found in Almotriptan malate 6.25mg</text>
						<statusCode code="active"/>
						<!-- A coded value denoting the importance of a detectable issue. Valid codes are: I - for Information, E - for Error, and W - for Warning -->
						<priorityCode code="W"/>
						<!-- 0..25 elements to indicate the event that trigger the issue -->
						<!-- active medication (prescription or non-prescription medication) that is recorded in the patient’s record and which contributed to triggering the issue -->
						<subject>
							<substanceAdministration moodCode="">
								<!-- Unique identifier of the prescription, immunization, or non-prescription drug record that triggered the issue - i.e. Interacting Prescription Number identifier-->
								<id root="2.16.124.9.101.1.1.4" extension="11111"/>
								<!-- Uses: ActSubstanceAdministrationCode: DRUG or IMMUNIZ-->
								<code code="DRUG"/>
								<statusCode code="active"/>
								<effectiveTime>
								<low value="20031101"/>
									<high value="20031130"/>
								</effectiveTime>
								<doseQuantity value="6.25" unit="mg"/>
								<consumable>
									<medication>
										<player determinerCode="KIND">
											<code code="02405792" codeSystem="2.16.840.1.113883.5.1105"/>
											<name>ALMOTRIPTAN (almotriptan (almotriptan malate) 6.25 mg oral tablet)</name>
										</player>
									</medication>
								</consumable>
							</substanceAdministration>
						</subject>
						<subject>
							<supplyEvent>
								<!-- Unique identifier of the dispensed event that triggered the issue. -->
								<id root="2.16.124.9.101.1.1.3" extension="121111"/>
								<statusCode code="completed"/>
								<!-- The date and time on which the product was issued to the patient. IVL.HIGH<TS.FULLDATE>	End date (includes end-date but start date and duration are unspecified)  -->
								<effectiveTime>
									<high value="20031101"/>
								</effectiveTime>
								<product>
									<medication>
										<player determinerCode="KIND">
											<code code="02405792" codeSystem="2.16.840.1.113883.5.1105"/>
											<name>ALMOTRIPTAN (almotriptan (almotriptan malate) 6.25 mg oral tablet)</name>
										</player>
									</medication>
								</product>
								<location>
									<serviceDeliveryLocation>
										<id root="2.16.840.1.113883.4.19" extension="123445"/>
										<addr>
											<city>Charlottetown</city>
											<state>PE</state>
											<postalCode>C1A5M7</postalCode>
											<country>Canada</country>
										</addr>
										<telecom use="WP" value="tel:9023457823"/>
										<location>
											<name>Shopper's Drug Mart</name>
										</location>
									</serviceDeliveryLocation>
								</location>
							</supplyEvent>
						</subject>
						<!-- optional element that is the decision support rule that triggered the issue: Provides detailed background for providers in evaluating the issue -->
						<instantiation>
							<detectedIssueDefinition>
								<!--  issue id: Knowledgebase organization specific identifier for the issue definition: we return the id of the monograph here allowing them to provide
									this in a future query where we will return the monograph text -->
								<id root="2.16.124.9.101.1.1.16" extension="2354"/>
								<author>
									<assignedEntity>
										<assignedOrganization>
											<name>FDB</name>
										</assignedOrganization>
									</assignedEntity>
								</author>
							</detectedIssueDefinition>
						</instantiation>
						<!-- supplied management for the issue -->
						<mitigatedBy>
							<detectedIssueManagement>
								<!-- ActDetectedIssueManagementCode vocab,  Indicates the kinds of management actions that have been taken, depending on the issue type -->
								<code code="5"/> <!-- consulted prescriber -->
								<!-- Additional free-text details describing the management of the issue -->
								<text>The 6.25mg dose pill included iron oxide which the patient was allergic to. The provider was consulted and issued a new prescription for the 12.5mg dose pill that does not include iron oxide. Patient was informed that they can not exceed 25mg/day</text>
								<statusCode code="active"/>
								<author>
									<time value="20031201100101"/>
									<assignedPerson>
										<!-- provider who managed the issue -->
										<id root="2.16.840.1.113883.4.76" extension="555555"/>
										<representedPerson>
											<name use="L">
												<given>Tech</given>
												<family>Timmy</family>
											</name>
										</representedPerson>
									</assignedPerson>
								</author>
							</detectedIssueManagement>
						</mitigatedBy>
						<subjectOf>
							<severityObservation>
								<code code="SEV"/>
								<statusCode code="completed"/>
								<!-- SeverityObservation vocab,  A coded value denoting the gravity of the detected issue -->
								<value code="M"/> <!-- moderate -->
							</severityObservation>
						</subjectOf>
					</detectedIssueEvent>
				</subjectOf2>
				<!-- 0..99 optional element for a note attached to the dispense: notes now have language code, but have dropped code to indicate note type -->
				<subjectOf3>
					<annotation>
						<text>Some textual observation about the dispense by the dispenser</text>
						<statusCode code="active"/>
						<languageCode code="EN"/>
						<author>
							<time value="20040101090101"/>
							<assignedPerson>
								<!-- id of provider who adds the note -->
								<id root="2.16.840.1.113883.4.15" extension="777777"/>
								<representedPerson>
									<name use="L">
										<given>Sue</given>
										<family>Script</family>
									</name>
								</representedPerson>
							</assignedPerson>
						</author>
					</annotation>
				</subjectOf3>
				<!-- if the return issues flag was off on the query - we will use this element to communicate whether there are any issues if present Indicates  there are issues  -->
				<subjectOf4>
					<subsetCode code="SUM"></subsetCode>
					<detectedIssueIndicator>
						<statusCode code="completed"></statusCode>
					</detectedIssueIndicator>
				</subjectOf4>
				<!-- if the return notes flag was off on the query instead of returning the notes, we willl simply use the presence or absence of this element to comunicate whether notes are attached or not -->
				<subjectOf5>
					<subsetCode code="SUM"></subsetCode>
					<annotationIndicator>
						<statusCode code="completed"></statusCode>
					</annotationIndicator>
				</subjectOf5>
			</medicationDispense>
		</subject>
		<!-- issues element to communicate any problems with the query - i.e. lack of access to a keyword protected profile - not DUR issues in this case -->
		<subjectOf>
			<detectedIssueEvent>
				<code></code>
				<statusCode></statusCode>
				<priorityCode></priorityCode>
				<subjectOf>
					<severityObservation>
						<code></code>
						<statusCode></statusCode>
						<value></value>
					</severityObservation>
				</subjectOf>
			</detectedIssueEvent>
		</subjectOf>
		<queryAck>
			<queryId root="2.16.124.9.101.1.2.5" extension="123"/>
			<queryResponseCode code="OK"/>
			<resultTotalQuantity value="1"/>
			<resultCurrentQuantity value="1"/>
			<resultRemainingQuantity value="0"/>
		</queryAck>
		<queryByParameter>
			<queryId root="2.16.124.9.101.1.8.5" extension="123"/>
			<parameterList>
				<!-- required element that indicates whether or not issues (detected and/or managed)  attached to the dispense records are to be returned along with the detailed information. -->
				<includeIssuesIndicator>
					<value value="false"/>
				</includeIssuesIndicator>
				<!-- Indicates whether or not notes attached to the selected dispense records are to be returned along with the detailed information  -->
				<includeNotesIndicator>
					<value value="false"/>
				</includeNotesIndicator>
				<!-- required values to identify the patient -->
				<patientBirthDate>
					<value value="19670405"/>
				</patientBirthDate>
				<patientGender>
					<value code="F"/>
				</patientGender>
				<patientID>
					<value root="2.16.840.1.113883.4.13" extension="999999999"/>
				</patientID>
				<patientName>
					<value>
						<given>Patti</given>
						<family>Patient</family>
					</value>
				</patientName>
				<!-- Identifies which  dispense record should be retrieved -->
				<prescriptionDispenseNumber>
					<value root="2.16.124.9.101.1.1.3" extension="987654321"/>
				</prescriptionDispenseNumber>
			</parameterList>
		</queryByParameter>
	</controlActEvent>
</PORX_IN060220CA>