<beans default-lazy-init="false"
    xmlns="http://www.springframework.org/schema/beans" 	
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
	
	<!--  DI 4	Device Shortage Report-->
	<bean id="DI4" class="gov.va.med.fw.report.ConfigurableReportBuilder">
		<constructor-arg ref="DI4.dataService"/>
		<property name="reportNameResolver"> 
			<bean class="gov.va.med.ccht.service.report.StandardReportNameResolver"/>
		</property>				
		<property name="reportDataService" ref="DI4.dataService"/>
		<property name="reportTemplate" ref="DI4.reportTemplate"/>
	</bean>
	
	<bean
		id="DI4.dataService" class="gov.va.med.fw.report.jasperreport.data.JasperReportDataService">

		<property name="reportDataDAOs">
			<map>
				<entry key="DI4.Summary.national" value="DI4.Summary.national.dataDAO"/>
				<entry key="DI4.Summary.visn" value="DI4.Summary.visn.dataDAO"/>
				<entry key="DI4.Summary.facility" value="DI4.Summary.facility.dataDAO"/>
			</map>
		</property>   	
    	
		<property name="metaDataMap">
		    <map>
				<entry key="DI4.Summary.national">
					<map>
						<entry key="visn_name"><value type="java.lang.Integer">0</value></entry>
						<entry key="facility_name"><value type="java.lang.Integer">1</value></entry>
						<entry key="vendor_name"><value type="java.lang.Integer">2</value></entry>
						<entry key="model_name"><value type="java.lang.Integer">3</value></entry>					
						<entry key="totalDevices"><value type="java.lang.Integer">4</value></entry>
						<entry key="requiredDevices"><value type="java.lang.Integer">5</value></entry>
						<entry key="shortage"><value type="java.lang.Integer">6</value></entry>								
					</map>
				</entry>
				<entry key="DI4.Summary.visn">
					<map>
						<entry key="visn_name"><value type="java.lang.Integer">0</value></entry>
						<entry key="facility_name"><value type="java.lang.Integer">1</value></entry>
						<entry key="vendor_name"><value type="java.lang.Integer">2</value></entry>
						<entry key="model_name"><value type="java.lang.Integer">3</value></entry>					
						<entry key="totalDevices"><value type="java.lang.Integer">4</value></entry>
						<entry key="requiredDevices"><value type="java.lang.Integer">5</value></entry>
						<entry key="shortage"><value type="java.lang.Integer">6</value></entry>								
					</map>
				</entry>						    
				<entry key="DI4.Summary.facility">
					<map>
						<entry key="visn_name"><value type="java.lang.Integer">0</value></entry>
						<entry key="facility_name"><value type="java.lang.Integer">1</value></entry>
						<entry key="vendor_name"><value type="java.lang.Integer">2</value></entry>
						<entry key="model_name"><value type="java.lang.Integer">3</value></entry>					
						<entry key="totalDevices"><value type="java.lang.Integer">4</value></entry>
						<entry key="requiredDevices"><value type="java.lang.Integer">5</value></entry>
						<entry key="shortage"><value type="java.lang.Integer">6</value></entry>								
					</map>
				</entry>									
		    </map>
		</property>
	</bean>

	<bean id="DI4.ehCacheStrategy" class="gov.va.med.fw.cache.EHCacheStrategy">
	</bean>
	
	<bean id="DI4.reportTemplate" class="gov.va.med.fw.report.jasperreport.JasperReportTemplate">
		<property name="templateCache" ref="DI3.ehCacheStrategy"/>
		<property name="templates">
			<map>			
				<entry key="DI4.Summary.national" value="di4_summary_national.jasper"/>
				<entry key="DI4.Summary.visn" value="di4_summary_visn.jasper"/>
				<entry key="DI4.Summary.facility" value="di4_summary_facility.jasper"/>
			</map>
		</property>
	</bean>
	
	<bean id="DI4.Summary.national.xls" class="gov.va.med.fw.report.excelreport.ExcelReport">
		<property name="reportTitle" value="National Device Shortage Report"/>
	</bean>
	<bean id="DI4.Summary.visn.xls" class="gov.va.med.fw.report.excelreport.ExcelReport">
		<property name="reportTitle" value="VISN Device Shortage Report"/>
	</bean>
	<bean id="DI4.Summary.facility.xls" class="gov.va.med.fw.report.excelreport.ExcelReport">
		<property name="reportTitle" value="Facility Device Shortage Report"/>
	</bean>			
		
	<bean id="DI4.dataDAO.abstract" abstract="true"
		class="gov.va.med.ccht.persistent.hibernate.StandardReportDataDAOImpl">
		<property name="postProcessRequired" value="false"/>
		<property name="paginated" value="false"/>
		<property name="queryName" value="di4_summary_visn"/>
	</bean>

	<bean id="DI4.Summary.national.dataDAO" parent="DI4.dataDAO.abstract">
		<property name="queryName" value="di4_summary_national"/>
	</bean>	
	<bean id="DI4.Summary.visn.dataDAO" parent="DI4.dataDAO.abstract">
		<property name="queryName" value="di4_summary_visn"/>
	</bean>
	<bean id="DI4.Summary.facility.dataDAO" parent="DI4.dataDAO.abstract">
		<property name="queryName" value="di4_summary_facility"/>
	</bean>	
</beans>

