<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd" [
	<!ENTITY currentProvider SYSTEM	"classpath://gov/va/med/cds/persistence/hibernate/common/CurrentProviderPractitionerLitePojo.hbm">
	<!--ENTITY dispense SYSTEM		"classpath://gov/va/med/cds/persistence/hibernate/pharmacy/OutpatientMedicationDispense40010.hbm"-->
]>
<hibernate-mapping default-lazy="false" default-cascade="all">
	<class entity-name="vwOutpatientPharmacyDetailRefillMedicationDispense" table="OUTPATIENT_MED_DSP_V" lazy="false" discriminator-value="R" name="gov.va.med.cds.template.generated.pharmacy.OutpatientMedicationDispense1">
		<id name="id" type="java.lang.Long">
			<column name="OUTPATIENT_MED_DSP_ID"/>
			<generator class="sequence">
				<param name="sequence">outpatient_med_dsp_seq_id</param>
			</generator>
		</id>
		
		<discriminator column="discriminator" type="character"/>
		
		<component name="quantityDispensed" class="gov.va.med.cds.template.generated.basedatatypes.PhysicalQuantity">
			<property name="value" column="QTYDISPENSED_VAL" type="java.lang.String" />
		</component>
		<property name="numberOfRefillsRemaining" column="NUM_REFILLS_REMAINING" type="integer" />
		<!-- From the subclass -->
		<property name="daysSupply" column="DAYS_SUPPLY" type="java.lang.String"/>
		
		<component name="dispensedDrug" class="gov.va.med.cds.template.generated.pharmacy.DispensedDrugInstance">
			<component name="drugUnitPrice" class="gov.va.med.cds.template.generated.basedatatypes.Money">
				<property name="value" column="DRUG_UNITPRICE_VAL" type="java.lang.String" />
			</component>
			<property name="expirationDate" type="gov.va.med.cds.persistence.hibernate.common.PointInTimeUserType">
				<column name="EXPIRATION_DT"/>
				<column name="EXPIRATION_DT_NBR"/>
			</property>
			<component name="ndc" class="gov.va.med.cds.template.generated.basedatatypes.HL72CodedElementLite">
				<property name="code" column="NDC_CODE" type="java.lang.String" />
				<property name="displayText" column="NDC_DSPLYTXT" type="java.lang.String" />
				<property name="codingSystem" column="NDC_CODSYS" type="java.lang.String" />
			</component>
		</component>
		<!-- import from .../common/CurrentProviderPractitionerLite.hbm -->
		<!--&currentProvider;-->

    </class>
</hibernate-mapping>
