<?xml version="1.0" encoding="UTF-8"?>
<!--
== Generated by hyperModel (www.XMLmodeling.com) Wed Dec 05 13:41:56 MST 2007
== Model: VHIM
== Package: Pharmacy
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:basedatatypes="Basedatatypes" xmlns:common="Common" xmlns:pharmacy="Pharmacy" targetNamespace="Pharmacy" elementFormDefault="unqualified" attributeFormDefault="unqualified">
	<xsd:import namespace="Basedatatypes" schemaLocation="Basedatatypes.xsd"/>
	<xsd:import namespace="Common" schemaLocation="Common.xsd"/>
	<!-- ================================================== -->
	<!-- =====  Complex Type Definitions  -->
	<!-- ================================================== -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  AncObservation  <<vHIMClass, observation>>  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xsd:complexType name="AncObservation">
		<xsd:sequence>
			<xsd:element name="count" type="basedatatypes:PhysicalQuantity"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  CMOPEvent  <<vHIMClass, act>>  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xsd:complexType name="CMOPEvent">
		<xsd:sequence>
			<xsd:element name="status" type="basedatatypes:HL72CodedElementLite"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  CancelAct  <<vHIMClass, controlAct>>  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xsd:complexType name="CancelAct">
		<xsd:sequence>
			<xsd:element name="cancelDate" type="basedatatypes:PointInTime"/>
			<xsd:element name="comment" type="xsd:string"/>
			<xsd:element name="canceller" type="common:PractitionerParticipationLite" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  DispensedDrugInstance  <<vHIMClass, manufacturedMaterial>>  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xsd:complexType name="DispensedDrugInstance">
		<xsd:sequence>
			<xsd:element name="drugUnitPrice" type="basedatatypes:Money"/>
			<xsd:element name="expirationDate" type="basedatatypes:PointInTime" minOccurs="0"/>
			<xsd:element name="lotId" type="xsd:string" minOccurs="0"/>
			<xsd:element name="ndc" type="basedatatypes:HL72CodedElementLite" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  MedicationDispense  <<vHIMClass, supply>>  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xsd:complexType name="MedicationDispense" abstract="true">
		<xsd:sequence>
			<xsd:element name="comments" type="xsd:string" minOccurs="0"/>
			<xsd:element name="dispenseDate" type="basedatatypes:PointInTime"/>
			<xsd:element name="fillDate" type="basedatatypes:PointInTime"/>
			<xsd:element name="hxQuantityDispensed" type="xsd:string" minOccurs="0"/>
			<xsd:element name="quantityDispensed" type="basedatatypes:PhysicalQuantity" minOccurs="0"/>
			<xsd:element name="currentProvider" type="common:PractitionerParticipationLite" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  MedicationInstructionComponent  <<vHIMClass, substanceAdministration>>  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xsd:complexType name="MedicationInstructionComponent">
		<xsd:sequence>
			<xsd:element name="conjunction" type="basedatatypes:HL72CodedElementLite" minOccurs="0"/>
			<xsd:element name="dispenseUnitsPerDose" type="xsd:double" minOccurs="0"/>
			<xsd:element name="dosageOrdered" type="xsd:string" minOccurs="0"/>
			<xsd:element name="noun" type="basedatatypes:HL72CodedElementLite" minOccurs="0"/>
			<xsd:element name="route" type="basedatatypes:HL72CodedElementLite" minOccurs="0"/>
			<xsd:element name="schedule" type="basedatatypes:HL72CodedElementLite" minOccurs="0"/>
			<xsd:element name="verb" type="basedatatypes:HL72CodedElementLite" minOccurs="0"/>
			<xsd:element name="vistaGiveUnits" type="basedatatypes:HL72CodedElementLite" minOccurs="0"/>
			<xsd:element name="vistaIntendedDuration" type="xsd:string" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  MedicationPromise  <<vHIMClass, substanceAdministration>>  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xsd:complexType name="MedicationPromise" abstract="true">
		<xsd:sequence>
			<xsd:element name="recordIdentifier" type="basedatatypes:HL72EntityIdentifier"/>
			<xsd:element name="pdtsPrescriptionId" type="xsd:string" minOccurs="0"/>
			<xsd:element name="prescriptionId" type="xsd:string"/>
			<xsd:element name="pharmacyPatientType" type="xsd:string"/>
			<xsd:element name="specialDrugTracking" type="pharmacy:SpecialDrugTracking" minOccurs="0"/>
			<xsd:element name="renewer" type="common:PractitionerParticipationLite" minOccurs="0"/>
			<xsd:element name="dataEnterer" type="common:PractitionerParticipationLite"/>
			<xsd:element name="pharmacyRequest" type="pharmacy:PharmacyRequest"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  OutpatientMedicationDispense  <<vHIMClass, supply>>  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xsd:complexType name="OutpatientMedicationDispense">
		<xsd:complexContent>
			<xsd:extension base="pharmacy:MedicationDispense">
				<xsd:sequence>
					<xsd:element name="daysSupply" type="xsd:string"/>
					<xsd:element name="identifier" type="basedatatypes:HL72EntityIdentifier" minOccurs="0"/>
					<xsd:element name="levelOfUnderstanding" type="basedatatypes:HL72CodedElementLite" minOccurs="0"/>
					<xsd:element name="mailWindow" type="xsd:string"/>
					<xsd:element name="releaseDate" type="basedatatypes:PointInTime" minOccurs="0"/>
					<xsd:element name="wasPatientCounseled" type="basedatatypes:HL72CodedElementLite"/>
					<xsd:element name="division" type="common:PharmacyDivision"/>
					<xsd:element name="dispensedDrug" type="pharmacy:DispensedDrugInstance"/>
					<xsd:element name="pharmacist" type="common:PractitionerParticipationLite"/>
					<xsd:element name="dataEnterer" type="common:PractitionerParticipationLite"/>
					<xsd:element name="cmopEvent" type="pharmacy:CMOPEvent" minOccurs="0"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  OutpatientMedicationPromise  <<vHIMClass, substanceAdministration>>  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xsd:complexType name="OutpatientMedicationPromise">
		<xsd:complexContent>
			<xsd:extension base="pharmacy:MedicationPromise">
				<xsd:sequence>
					<xsd:element name="patientIdentifier" type="basedatatypes:HL72PersonIdentifier"/>
					<xsd:element name="expirationDate" type="basedatatypes:PointInTime" minOccurs="0"/>
					<xsd:element name="lastDispenseDate" type="basedatatypes:PointInTime" minOccurs="0"/>
					<xsd:element name="numberOfRefillsAuthorized" type="xsd:int"/>
					<xsd:element name="patientInstructions" type="xsd:string" minOccurs="0"/>
					<xsd:element name="otherPatientInstructions" type="xsd:string" minOccurs="0"/>
					<xsd:element name="expandedPatientInstructions" type="xsd:string" minOccurs="0"/>
					<xsd:element name="sig" type="xsd:string"/>
					<xsd:element name="copayTransactionType" type="basedatatypes:HL72CodedElementLite" minOccurs="0"/>
					<xsd:element name="transitionalRxBenefit" type="basedatatypes:HL72CodedElementLite" minOccurs="0"/>
					<xsd:element name="treatmentFactor" type="common:TreatmentFactor" minOccurs="0" maxOccurs="100"/>
					<xsd:element name="originalDispense" type="pharmacy:OutpatientMedicationDispense" minOccurs="0"/>
					<xsd:element name="refillDispense" type="pharmacy:OutpatientMedicationDispense" minOccurs="0" maxOccurs="1000"/>
					<xsd:element name="partialDispense" type="pharmacy:OutpatientMedicationDispense" minOccurs="0" maxOccurs="100"/>
					<xsd:element name="cancel" type="pharmacy:CancelAct" minOccurs="0"/>
					<xsd:element name="medicationInstructions" type="pharmacy:MedicationInstructionComponent" maxOccurs="100"/>
					<xsd:element name="finisher" type="common:PractitionerParticipationLite" minOccurs="0"/>
					<xsd:element name="patientInformation" type="common:PatientInformation"/>
					<xsd:element name="recordVersion" type="xsd:int"/>
					<xsd:element name="recordUpdateTime" type="basedatatypes:PointInTime"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  PharmacyRequest  <<vHIMClass, substanceAdministration>>  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xsd:complexType name="PharmacyRequest">
		<xsd:sequence>
			<xsd:element name="cosigner" type="common:PractitionerParticipationLite" minOccurs="0"/>
			<xsd:element name="orderedMedication" type="common:Medicine"/>
			<xsd:element name="genericRequest" type="common:GenericRequest"/>
			<xsd:element name="orderLocation" type="common:HospitalLocation"/>
			<xsd:element name="orderedItem" type="common:PharmacyOrderableItem"/>
			<xsd:element name="orderingInstitution" type="common:Institution" minOccurs="0"/>
			<xsd:element name="orderDate" type="basedatatypes:PointInTime" minOccurs="0"/>
			<xsd:element name="status" type="xsd:string"/>
			<xsd:element name="statusModifier" type="basedatatypes:HL72CodedElementLite"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  SpecialDrugTracking  <<vHIMClass, act>>  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xsd:complexType name="SpecialDrugTracking">
		<xsd:sequence>
			<xsd:element name="totalDailyDosage" type="basedatatypes:PhysicalQuantity" minOccurs="0"/>
			<xsd:element name="wbcObservation" type="pharmacy:WbcObservation" minOccurs="0"/>
			<xsd:element name="trackedDrug" type="common:Medicine"/>
			<xsd:element name="ancObservation" type="pharmacy:AncObservation" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!--  WbcObservation  <<vHIMClass, observation>>  -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<xsd:complexType name="WbcObservation">
		<xsd:sequence>
			<xsd:element name="count" type="basedatatypes:PhysicalQuantity"/>
			<xsd:element name="testDate" type="basedatatypes:PointInTime" minOccurs="0"/>
		</xsd:sequence>
	</xsd:complexType>
</xsd:schema>
