<?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="surveyPatient" table="CENSUS_PATIENT" lazy="false">
        <id type="java.lang.Long" name="id">
            <column name="SURVEY_PATIENT_ID"/>
            <generator class="sequence" >
				<param name="sequence">survey_patient_seq_id</param>
			</generator>
        </id>


		<property name="icn" column="ICN" type="java.lang.String" node="icn" />

        <component name="name" node="name">
			<property name="family" column="FAMILY_NAME" type="java.lang.String" node="family" />
			<property name="given" column="GIVEN_NAME" type="java.lang.String" node="given" />
			<property name="middle" column="MIDDLE_NAME" type="java.lang.String" node="middle" />
		</component>

		<property name="ssn" column="SSN" type="java.lang.String" node="ssn" />
		
		<property name="birthDate" node="birthdate">
			<column name="BIRTH_DATE_DT"/>
			<type name="gov.va.med.cds.persistence.hibernate.common.Dom4jDateUserType">
				<param name="dateFormat">yyyy-MM-dd</param>
				<param name="nodeName">birthdate</param>
			</type>
		</property>
	<property name="vendorMrn" column="VENDOR_MRN" type="java.lang.String" node="vendorMRN"/>
	<property name="vendorID" column="VENDOR_ID" type="java.lang.String" node="vendorID"/>
	<!--  
	<many-to-one name="vendor" entity-name="vendor" column="VENDOR_ID" unique="true" node="vendor" />
	-->
    </class>

</hibernate-mapping>
