<?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="documentUpdateEvents" table="DOCUMENT_CHANGE_V" lazy="false" node="documentUpdateEvents">
        <id name="id" type="java.lang.Long" >
            <column name="DOCUMENT_CHANGE_ID" />
 			<generator class="sequence">
				<param name="sequence">document_change_seq_id</param>
			</generator>
        </id>
        
        <property name="clinicalDocumentId" type="integer" column="CLINICAL_DOCUMENT_ID" node="clinicalDocumentId" insert="false" update="false"/>

		<component name="initialPatientName" node="initialPatientName">
			<property name="prefix" column="INITIAL_PAT_NAME_PREFIX" type="java.lang.String" node="prefix"/>
			<property name="given" column="INITIAL_PAT_NAME_GIVEN" type="java.lang.String" node="given"/>
			<property name="middle" column="INITIAL_PAT_NAME_MIDDLE" type="java.lang.String" node="middle"/>
			<property name="family" column="INITIAL_PAT_NAME_FAMILY" type="java.lang.String" node="family"/>
			<property name="suffix" column="INITIAL_PAT_NAME_SUFFIX" type="java.lang.String" node="suffix"/>
			<property name="title" column="INITIAL_PAT_NAME_TITLE" type="java.lang.String" node="title"/>
		</component>

		<component name="finalPatientName" node="finalPatientName">
			<property name="prefix" column="FINAL_PAT_NAME_PREFIX" type="java.lang.String" node="prefix"/>
			<property name="given" column="FINAL_PAT_NAME_GIVEN" type="java.lang.String" node="given"/>
			<property name="middle" column="FINAL_PAT_NAME_MIDDLE" type="java.lang.String" node="middle"/>
			<property name="family" column="FINAL_PAT_NAME_FAMILY" type="java.lang.String" node="family"/>
			<property name="suffix" column="FINAL_PAT_NAME_SUFFIX" type="java.lang.String" node="suffix"/>
			<property name="title" column="FINAL_PAT_NAME_TITLE" type="java.lang.String" node="title"/>
		</component>

        <component name="initialVisitDate" node="initialVisitDate" >
		  <property name="literal" type="gov.va.med.cds.persistence.hibernate.common.Dom4jPointInTimeUserType" node="literal">
			<column name="INITIAL_VISIT_DT" />
			<column name="INITIAL_VISIT_DT_NBR"/>
		  </property>
        </component>

        <component name="finalVisitDate" node="finalVisitDate" >
		  <property name="literal" type="gov.va.med.cds.persistence.hibernate.common.Dom4jPointInTimeUserType" node="literal">
			<column name="FINAL_VISIT_DT" />
			<column name="FINAL_VISIT_DT_NBR"/>
		  </property>
        </component>

        <component name="initialVisitLocationIdentifier" node="initialVisitLocation">
			<property name="pointOfCare" column="INITVST_LOC_POINT_OF_CARE" type="java.lang.String" node="pointOfCare"/>
			<property name="room" column="INITVST_LOC_ROOM" type="java.lang.String" node="room"/>
			<property name="bed" column="INITVST_LOC_BED" type="java.lang.String" node="bed"/>
			<property name="facilityNamespaceId" column="INITVST_LOC_FCLTY_NMSPCID" type="java.lang.String" node="facilityNamespaceId"/>
			<property name="facilityUniversalId" column="INITVST_LOC_FCLTY_UNVSID" type="java.lang.String" node="facilityUniversalId"/>
			<property name="facilityUniversalIdType" column="INITVST_LOC_FCLTY_UNVSIDTYP" type="java.lang.String" node="facilityUniversalIdType"/>
			<property name="personLocationType" column="INITVST_LOC_PERS_LOC_TYP" type="java.lang.String" node="personLocationType"/>
			<property name="locationDescription" column="INITVST_LOC_DESCRIPTION" type="java.lang.String" node="locationDescription"/>
		</component>

        <component name="finalVisitLocationIdentifier" node="finalVisitLocation">
			<property name="pointOfCare" column="FINALVST_LOC_POINT_OF_CARE" type="java.lang.String" node="pointOfCare"/>
			<property name="room" column="FINALVST_LOC_ROOM" type="java.lang.String" node="room"/>
			<property name="bed" column="FINALVST_LOC_BED" type="java.lang.String" node="bed"/>
			<property name="facilityNamespaceId" column="FINALVST_LOC_FCLTY_NMSPCID" type="java.lang.String" node="facilityNamespaceId"/>
			<property name="facilityUniversalId" column="FINALVST_LOC_FCLTY_UNVSID" type="java.lang.String" node="facilityUniversalId"/>
			<property name="facilityUniversalIdType" column="FINALVST_LOC_FCLTY_UNVSIDTYP" type="java.lang.String" node="facilityUniversalIdType"/>
			<property name="personLocationType" column="FINALVST_LOC_PERS_LOC_TYP" type="java.lang.String" node="personLocationType"/>
			<property name="locationDescription" column="FINALVST_LOC_DESCRIPTION" type="java.lang.String" node="locationDescription"/>
		</component>

        <component name="initialVisitTypeCode" node="initialVisitType">
			<property name="code" column="INITIAL_VISIT_TYPE_CODE" type="java.lang.String" node="code"/>
			<property name="displayText" column="INITIAL_VISIT_TYPE_DSPLYTXT" type="java.lang.String" node="displayText"/>
			<property name="codingSystem" column="INITIAL_VISIT_TYPE_CODSYS" type="java.lang.String" node="codingSystem"/>
		</component>

        <component name="finalVisitTypeCode" node="finalVisitType">
			<property name="code" column="FINAL_VISIT_TYPE_CODE" type="java.lang.String" node="code"/>
			<property name="displayText" column="FINAL_VISIT_TYPE_DSPLYTXT" type="java.lang.String" node="displayText"/>
			<property name="codingSystem" column="FINAL_VISIT_TYPE_CODSYS" type="java.lang.String" node="codingSystem"/>
		</component>

		<property name="initialVisitRecord" column="INITIAL_VISIT_RECORD" type="java.lang.String" node="initialVisitRecord"/>

		<property name="finalVisitRecord" column="FINAL_VISIT_RECORD" type="java.lang.String" node="finalVisitRecord"/>
        
        <component name="reassignmentDate" node="reassignmentDate" >
		  <property name="literal" type="gov.va.med.cds.persistence.hibernate.common.Dom4jPointInTimeUserType" node="literal">
			<column name="REASSIGNMENT_DT" />
			<column name="REASSIGNMENT_DT_NBR"/>
		  </property>
        </component>
        
        <many-to-one name="reassigner" entity-name="TiuSinglePractitionerLite" node="reassigner">
            <column name="REASSIGNER_TPP_ID" />
        </many-to-one>

        <component name="editDate" node="editDate" >
		  <property name="literal" type="gov.va.med.cds.persistence.hibernate.common.Dom4jPointInTimeUserType" node="literal">
			<column name="EDIT_DT" />
			<column name="EDIT_DT_NBR"/>
		  </property>
        </component>

        <many-to-one name="editor" entity-name="TiuSinglePractitionerLite" node="editor">
            <column name="EDITOR_TPP_ID" />
        </many-to-one>

		<property name="interdisciplinaryNoteParent" column="INTERDISC_NOTE_PARENT" type="java.lang.String" node="interdisciplinaryNoteParent"/>

        <many-to-one name="interdisciplinaryNoteMarker" entity-name="TiuSinglePractitionerLite" node="interdisciplinaryNoteMarker">
            <column name="INTERDISC_NOTE_MARKER_TPP_ID" />
        </many-to-one>

        <component name="interdisciplinaryNoteActionCode" node="interdisciplinaryNoteActionCode">
			<property name="code" column="INTERDISC_NOTE_ACT_CODE" type="java.lang.String" node="code"/>
			<property name="displayText" column="INTERDISC_NOTE_ACT_DSPLYTXT" type="java.lang.String" node="displayText"/>
			<property name="codingSystem" column="INTERDISC_NOTE_ACT_CODSYS" type="java.lang.String" node="codingSystem"/>
		</component>

        <component name="interdisciplinaryNoteActionDate" node="interdisciplinaryNoteActionDate" >
		  <property name="literal" type="gov.va.med.cds.persistence.hibernate.common.Dom4jPointInTimeUserType" node="literal">
			<column name="INTERDISC_NOTE_ACT_DT"/>
			<column name="INTERDISC_NOTE_ACT_DT_NBR"/>
		  </property>
        </component>

		<property name="interdisciplinaryNoteEntryStatus" column="INTERDISC_NOTE_ENTRY_STATUS" type="java.lang.String" node="interdisciplinaryNoteEntryStatus"/>

        <component name="deletionReasonCode" node="deletionReasonCode">
			<property name="code" column="DELETION_REASON_CODE" type="java.lang.String" node="code"/>
			<property name="displayText" column="DELETION_REASON_DSPLYTXT" type="java.lang.String" node="displayText"/>
			<property name="codingSystem" column="DELETION_REASON_CODSYS" type="java.lang.String" node="codingSystem"/>
		</component>

        <many-to-one name="deleter" entity-name="TiuSinglePractitionerLite" node="deleter">
            <column name="DELETER_TPP_ID" />
        </many-to-one>

        <component name="deletionDate" node="deletionDate" >
		  <property name="literal" type="gov.va.med.cds.persistence.hibernate.common.Dom4jPointInTimeUserType" node="literal">
			<column name="DELETION_DT" />
			<column name="DELETION_DT_NBR"/>
		  </property>
        </component>

	</class>
</hibernate-mapping>
