<?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">
<hibernate-mapping default-lazy="false" default-cascade="all">



	<class entity-name="labTest" table="VISTA_HDSI.WKLD_CODE_64" lazy="false" node="labTest">

		<id name="id" type="big_decimal">
			<column name="ROWID" />
			<generator class="assigned" />
		</id>

		<property name="defaultLoincCode" column="DEFAULT_LOINC_CODE" type="big_decimal" node="defaultLoincCode" />

		<component node="labTests" name="labTests">
			<component node="orderedTestCode" name="orderedTestCode">
				<property name="code" column="WKLD_CODE" type="java.lang.String" node="code" />

				<property name="displayText" type="java.lang.String" node="displayText">
					<formula>
						(CASE
						WHEN (PROCEDURE_01 IS NOT NULL) THEN PROCEDURE_01
						ELSE NULL
						END)
					</formula>
				</property>
				<property name="codingSystem" type="java.lang.String" node="codingSystem">
					<formula>
						(CASE
						WHEN (PROCEDURE_01 IS NOT NULL) THEN
						VISTA_HDSI.HDSREPSQLUtil1_StationNumber()||'_64'
						ELSE NULL
						END)
					</formula>
				</property>
			</component>
		</component>
	</class>

	<query name="MHVLabRead40011ForNLT.LabTestPromises.labTests.orderedTestCode3"> 
	 	<![CDATA[ 
	 	    select labTest.labTests 
	 		from labTest labTest
	 		where labTest.labTests.orderedTestCode.code like :partOfPanelTest
	 	]]>
	</query>
</hibernate-mapping>