<?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-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
	<bean
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
	</bean>
	<bean name="mllpAccessValidator"
		class="gov.va.med.cds.socket.server.handler.MllpAccessValidator">
		<property name="allowableParameterValues" ref="allowableParameterValues" />
	</bean>


	<util:map id="allowableParameterValues">
		<!-- List of allowable Parameter Values for CHDR  in qa-->
		<entry key="CHDR SENDER">
			<util:map id="allowableParameterValuesCHDRSender">
				<entry key="/MSH-3">
					<list>
						<value>CHDR</value>
						<value>CHDR SENDER</value>
					</list>
				</entry>
				<entry key="/MSH-9-1">
					<list>
						<value>QBP</value>
					</list>
				</entry>
			</util:map>
		</entry>

		<!-- List of allowable Parameter Values for CHDR in prod -->
		<entry key="CHDR">
			<util:map id="allowableParameterValuesCHDR">
				<entry key="/MSH-3">
					<list>
						<value>CHDR</value>
					</list>
				</entry>
				<entry key="/MSH-9-1">
					<list>
						<value>QBP</value>
					</list>
				</entry>
			</util:map>
		</entry>
		
		<!-- List of allowable Parameter Values for VistA Lab writes -->
		<entry key="LA7LAB">
			<util:map id="allowableParameterValuesVistA">
				<!-- REQ 4.1 Sending Applications (MSH-3)- LA7LAB  -->
				<entry key="/MSH-3">
					<list>
						<value>LA7LAB</value>
					</list>
				</entry>
				<!-- REQ 4.3 Message Type (MSH-9) - ORU  -->
				<entry key="/MSH-9-1">
					<list>
						<value>ORU</value>
					</list>
				</entry>
				<!-- REQ 4.2 Receiving Application (MSH-5) - LA7HDR  -->
				<entry key="/MSH-5">
					<list>
						<value>LA7HDR</value>
					</list>
				</entry>
				<!-- REQ 4.4 Message Processing ID (MSH-11) - P or T  -->
				<entry key="/MSH-11">
					<list>
						<value>P</value>
						<value>T</value>
					</list>
				</entry>
				<!-- REQ 4.5 Version (MSH-12) - 2.4  -->
				<entry key="/MSH-12">
					<list>
						<value>2.4</value>
					</list>
				</entry>
			</util:map>
		</entry>
	</util:map>
	
	<bean id="hl7Utility" class="gov.va.med.cds.hapi.HL7Utility">
		<property name="jdbcTemplateForMessageControlId" ref="jdbcTemplateForMessageControlId"/>
		<property name ="facilityIdMap" ref="facilityIdMap"/>
	</bean>
	
	
	<bean id="jdbcTemplateForMessageControlId"  class="org.easymock.EasyMock" factory-method="createNiceMock"  name="jdbcTemplateMock">
   		 <constructor-arg index="0" value="org.springframework.jdbc.core.JdbcOperations"/>
	</bean>
	
	<util:map id="facilityIdMap" map-class="java.util.HashMap"/>

</beans>