<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">

	<bean id="clinicalDataGenerator" class="gov.va.med.cds.builders.ClinicalDataGenerator">
		<property name="clinicalDataBuilder" ref="clinicalDataBuilder"/>
		<property name="pathwaysDataBuilder" ref="pathwaysDataBuilder"/>
	</bean>

	<bean id="clinicalDataBuilder" class="gov.va.med.cds.testharness.vhim400.builders.ClinicalDataBuilder">
		<!-- <property name="templateManager" ref="templateMetaDataProvider" />  -->
		<property name="domainEntryPointsWrappersMap">
			<map>
				<entry key="AllergyAssessment" value-ref ="allergyAssessmentBuilderFactory" />
				<entry key="IntoleranceCondition" value-ref ="intoleranceConditionBuilderFactory" />
				<entry key="OutpatientMedicationPromise" value-ref ="outpatientMedicationPromiseBuilderFactory" />
				<entry key="VitalSignObservationEvent" value-ref ="vitalsBuilderFactory" />
				<entry key="LabTestPromise"  value-ref ="labTestPromiseBuilderFactory" />
			    <!-- DOESN'T EXIST entry key="ClinicalDocumentEvent"  value-ref ="vdmTiuBuilderFactory" / --> 
			    <entry key="NonVaMedicationEvent"  value-ref ="nonVaMedBuilderFactory" />
			</map>
		</property>
		<property name="domainEntryPointsMap" ref="domainEntryPointsMap"/>
	</bean>

	<bean id="allergyAssessmentBuilderFactory"
		class="gov.va.med.cds.testharness.vhim400.builders.AllergyAssessmentBuilderFactory">
		<property name="allergyAssessmentBuilder">
			<bean
				class="gov.va.med.cds.testharness.vhim400.builders.AllergyAssessmentBuilder" />
		</property>
	</bean>	 
	
	<bean id="pathwaysDataBuilder" class="gov.va.med.cds.testharness.vhim400.builders.PathwaysDataBuilder">
		<property name="domainEntryPointsWrappersMap">
			<map>
	     	    <entry key="patientDataAccessedEvent"  value-ref ="patientDataAccessBuilderFactory" />
			</map>
		</property>
		<property name="domainEntryPointsMap" ref="domainEntryPointsMap"/>
	</bean>
				
	<bean id="patientDataAccessBuilderFactory"
		class="gov.va.med.cds.testharness.vhim400.builders.SensitivePatientDataAccessBuilderFactory">
		<property name="sensitivePatientDataAccessBuilder">
			<bean
				class="gov.va.med.cds.testharness.vhim400.builders.SensitivePatientDataAccessBuilder" />
		</property>
	</bean>	 	 
	<bean id="intoleranceConditionBuilderFactory"
		class="gov.va.med.cds.testharness.vhim400.builders.IntoleranceConditionBuilderFactory">
		<property name="intoleranceConditionBuilder">
			<bean
				class="gov.va.med.cds.testharness.vhim400.builders.IntoleranceConditionBuilder" />
		</property>
	</bean>
	<bean id="labTestPromiseBuilderFactory"
		class="gov.va.med.cds.testharness.vhim400.builders.LabBuilderFactory">
		<property name="labBuilder">
			<bean class="gov.va.med.cds.testharness.vhim400.builders.LabBuilder" />
		</property>
	</bean>
	<bean id="outpatientMedicationPromiseBuilderFactory"
		class="gov.va.med.cds.testharness.vhim400.builders.OutpatientMedicationPromiseBuilderFactory">
		<property name="outpatientMedicationPromiseBuilder">
			<bean
				class="gov.va.med.cds.testharness.vhim400.builders.OutpatientMedicationPromiseBuilder" />
		</property>
	</bean>
	<bean id="vitalsBuilderFactory"
		class="gov.va.med.cds.testharness.vhim400.builders.VitalSignObservationEventBuilderFactory">
		<property name="vitalSignObservationEventBuilder">
			<bean class="gov.va.med.cds.testharness.vhim400.builders.VitalsBuilder" />
		</property>
	</bean>
	<bean id="nonVaMedBuilderFactory"
        class="gov.va.med.cds.testharness.vhim400.builders.NonVaMedBuilderFactory">
        <property name="nonVaMedBuiler">
            <bean class="gov.va.med.cds.testharness.vhim400.builders.NonVaMedBuilder" />
        </property>
    </bean>
	
	<util:map id="domainEntryPointsMap" map-class="java.util.HashMap">
				<entry key="AllergyAssessmentCreate40020"> <ref bean="allergyAssessmentDomainEntryPoint"/></entry> 
				<entry key="IntoleranceConditionCreate40020"><ref bean ="intoleranceConditionDomainEntryPoint"/></entry> 
				<entry key="LabCreate40020"><ref bean ="labCreateDomainEntryPoint"/></entry>  
				<entry key="PharmacyCreate40020"><ref bean ="pharmacyCreateDomainEntryPoint"/></entry>  
				<entry key="VitalsignsCreate40020"><ref bean ="vitalsignsCreateDomainEntryPoint"/></entry>  
				<entry key="AllergyAssessmentCreateOrUpdate40060"><ref bean ="allergyAssessmentDomainEntryPoint"/></entry>  
				<entry key="IntoleranceConditionCreateOrUpdate40060"><ref bean="intoleranceConditionDomainEntryPoint"/></entry> 
				<entry key="LabCreateOrUpdate40060"><ref bean ="labCreateDomainEntryPoint"/></entry>  
				<entry key="PharmacyCreateOrUpdate40060"><ref bean ="pharmacyCreateDomainEntryPoint"/></entry>  
				<entry key="VitalsignsCreateOrUpdate40060"><ref bean ="vitalsignsCreateDomainEntryPoint"/></entry> 
				<entry key="SensitivePatientAccessCreate1"><ref bean ="sensitivePatientAccessCreateDomainEntryPoint"/></entry> 
	</util:map>	

	<util:constant id="allergyAssessmentDomainEntryPoint" static-field="gov.va.med.cds.clinicaldata.DomainEntryPoint.AllergyAssessment" />
	<util:constant id="intoleranceConditionDomainEntryPoint" static-field="gov.va.med.cds.clinicaldata.DomainEntryPoint.IntoleranceCondition" />
	<util:constant id="labCreateDomainEntryPoint" static-field="gov.va.med.cds.clinicaldata.DomainEntryPoint.LabTestPromise" />
	<util:constant id="pharmacyCreateDomainEntryPoint" static-field="gov.va.med.cds.clinicaldata.DomainEntryPoint.OutpatientMedicationPromise" />
	<util:constant id="vitalsignsCreateDomainEntryPoint" static-field="gov.va.med.cds.clinicaldata.DomainEntryPoint.VitalSignObservationEvent" />
	<util:constant id="sensitivePatientAccessCreateDomainEntryPoint" static-field="gov.va.med.cds.clinicaldata.DomainEntryPoint.PatientDataAccessedEvent" />
	</beans>
