<%@ taglib uri="/tags/struts-bean-el" prefix="bean-el" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html-el" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/tags/fw" prefix="fw" %>
<%@ taglib uri="/tags/esr-core" prefix="esrcore" %>
<%@ page import='gov.va.med.esr.ui.report.action.ReportConstants' %>
<%@ page import='gov.va.med.esr.ui.report.action.ReportScheduleInfoForm' %>
<%@ page import='gov.va.med.esr.common.model.lookup.ReportPeriodType' %>
<%@ page import='gov.va.med.esr.common.model.lookup.ReportFacilityDisplayBy' %>
<%@ page import='gov.va.med.esr.common.model.lookup.ReportFormat' %>
<%@ page import='gov.va.med.esr.common.model.lookup.ReportDetailBy'%>
<%@ page import='gov.va.med.esr.common.model.lookup.ReportRunFrequency' %>
<c:set var="mmddyyyyText" scope="page"><bean-el:message key="label.mmddyyyy"/></c:set>
<%@ include file="../scripts/ReportScripts.js" %>
<%@ include file="reportParameterConstants.jsp" %>

<!-- Report Parameter Configuration Map based the report id -->
<c:set var="reportParamConfig" value="${reportParamConfigMap[reportInfoForm.reportIdNoSpace]}" />

<c:if test="${reportParamConfig[reportPeriodTypeParam] != null}">
  <jsp:include page="reportParametersReportPeriod.jsp" flush="true" />
</c:if>
<c:if test="${reportParamConfig[registryTypeParam] != null}">
    <esrcore:setLookup var="RegistryType" className="gov.va.med.esr.common.model.lookup.RegistryType" />
    <tr><td colspan="3">&nbsp;</td></tr>
    <tr>
    	<td class="moduleLabel" style="vertical-align: top"><fw:label required="true" property="registryType" forId="registryTypeId"><bean-el:message key="label.report.registryType" />:</fw:label></td>
    	<td class="moduleValue" colspan="2">
    	  <table border="0" cellpadding="0" cellspacing="0">
    	  <c:set var="registryTypeAllText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.registryType"/>&nbsp;(<bean-el:message key="label.report.allRegistries" />)</c:set>
	    <tr><td><html-el:multibox title="${registryTypeAllText}" property="registryType" styleId="registryTypeId" value="${ALL}" onclick="checkAll(this)" /></td><td colspan="2" class="moduleValue"><bean-el:message key="label.report.allRegistries" /></td></tr>
	    <c:forEach var="item" items="${RegistryType}">
		<c:set var="registryTypeText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.registryType"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
		<tr><td width="1%">&nbsp;&nbsp;</td><td><html-el:multibox title="${registryTypeText}" property="registryType" value="${item.code}" /></td><td class="moduleValue" width="99%"><c:out value="${item.description}" /></td></tr>
	    </c:forEach>
	  </table>
    	</td>
    </tr>
</c:if>
<c:if test="${reportParamConfig[phUnconfirmedForMoreThanParam] != null}">
    <tr><td colspan="3">&nbsp;</td></tr>
    <tr>
	<td class="moduleLabel"><fw:label required="true" property="phUnconfirmedForMoreThan" forId="phUnconfirmedForMoreThanId"><bean-el:message key="label.report.phUnconfirmedForMoreThan" />:</fw:label></td>
	<c:set var="phUnconfirmedForMoreThanText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.phUnconfirmedForMoreThan"/>&nbsp;(days)</c:set>
	<td class="moduleValue" colspan="2" nowrap><html-el:text title="${phUnconfirmedForMoreThanText}" styleId="phUnconfirmedForMoreThanId" property="phUnconfirmedForMoreThan" styleClass="moduleEdit" size="5" maxlength="3"/>&nbsp;days</td>
    </tr>
</c:if>
<c:if test="${reportParamConfig[letterFileReceivedDateParam] != null}">
    <tr><td colspan="3">&nbsp;</td></tr>
    <tr>
	<td class="moduleLabel"><fw:label required="true" property="letterFileReceivedDate" forId="letterFileReceivedDateId"><bean-el:message key="label.report.dateLetterFileReceived" />:</fw:label></td>
	<c:set var="dateLetterFileReceivedText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.dateLetterFileReceived"/>&nbsp;<c:out value="${mmddyyyyText}" /></c:set>
	<td class="moduleValue" colspan="2" nowrap><html-el:text title="${dateLetterFileReceivedText}" styleId="letterFileReceivedDateId" property="letterFileReceivedDate" styleClass="moduleEdit" size="10" maxlength="10"/>&nbsp;<bean-el:message key="label.mmddyyyy" /></td>
    </tr>
</c:if>

<c:if test="${reportParamConfig[facilitiesParam] != null || reportParamConfig[visnParam] != null }">
	<c:choose>
	<c:when test="${reportInfoForm.reportIdNoSpace == 'EED10'}">
	        <tr><td colspan="3">&nbsp;</td></tr>
		<tr id="reportDetailBy">
		<td colspan="3" align="center">
		<table border="0" cellpadding="0" cellspacing="0">
    		<jsp:include page="reportParametersFacility.jsp" flush="true" />
    		</table>
    		</td></tr>
    	</c:when>
	<c:when test="${reportInfoForm.reportIdNoSpace == 'P8G1' || reportInfoForm.reportIdNoSpace == 'P8G2' || reportInfoForm.reportIdNoSpace == 'P8G3' || reportInfoForm.reportIdNoSpace == 'P8G4'}">    	
    		<jsp:include page="reportP8ParametersFacility.jsp" flush="true" />
    	</c:when>
    	<c:otherwise>
    		<jsp:include page="reportParametersFacility.jsp" flush="true" />
    	</c:otherwise>
    	</c:choose>
</c:if>
<c:if test="${reportParamConfig[enrollmentProcessStatusParam] != null}">
    <esrcore:setLookup var="EnrollmentProcessStatusList" className="gov.va.med.esr.common.model.lookup.EnrollmentProcessStatus" />
    <tr><td colspan="3">&nbsp;</td></tr>
    <tr>
    	<td class="moduleLabel" style="vertical-align: top"><bean-el:message key="label.report.enrollmentProcessStatus" />:</td>
    	<td class="moduleValue" colspan="2">
    	  <table border="0" cellpadding="0" cellspacing="0">
    	    <c:forEach var="item" items="${EnrollmentProcessStatusList}">
		<c:set var="enrollmentProcessStatusText"><bean-el:message key="label.report.enrollmentProcessStatus"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
		<tr><td><html-el:radio title="${enrollmentProcessStatusText}" styleId="enrollProcessStatusId_${item.code}" property="enrollmentProcessStatus" value="${item.code}" /></td><td class="moduleValue"><fw:label property="enrollmentProcessStatus" forId="enrollProcessStatusId_${item.code}"><c:out value="${item.description}" /></fw:label></td></tr>
	    </c:forEach>
	  </table>
    	</td>
    </tr>
</c:if>

<c:if test="${reportParamConfig[outlierDaysParam] != null}">
<tr><td colspan="3">&nbsp;</td></tr>
<c:choose>
	<c:when test="${reportInfoForm.reportIdNoSpace == 'QM11' || reportInfoForm.reportIdNoSpace == 'QM3'}">
	    <tr id="outlierDaysID">
		<td class="moduleLabel"><fw:label property="outlierDays" forId="11outlierDaysId"><bean-el:message key="label.report.outlierDays" />:</fw:label></td>
		<c:set var="outlierDaysText"><bean-el:message key="label.report.outlierDays"/>&nbsp;(days)</c:set>
		<td class="moduleValue" colspan="2" nowrap><html-el:text title="${outlierDaysText}" styleId="11outlierDaysId" property="outlierDays" styleClass="moduleEdit" size="3" maxlength="3"/>&nbsp;days</td>
    	    </tr>
	</c:when>
	<c:when test="${reportInfoForm.reportIdNoSpace == 'QM15'}">
	    <tr>
		<td class="moduleLabel"><fw:label property="outlierDays" forId="15outlierDaysId"><bean-el:message key="label.report.days" />:</fw:label></td>
		<c:set var="daysText"><bean-el:message key="label.report.days"/></c:set>
		<td class="moduleValue" colspan="2" nowrap><html-el:text title="${daysText}" property="outlierDays" styleId="15outlierDaysId" styleClass="moduleEdit" size="3" maxlength="3"/>&nbsp;days</td>
	    </tr>
	</c:when>
	<c:otherwise>
	    <tr>
		<td class="moduleLabel"><fw:label property="outlierDays" forId="outlierDaysId"><bean-el:message key="label.report.outlierDays" />:</fw:label></td>
		<c:set var="outlierDaysText"><bean-el:message key="label.report.outlierDays"/>&nbsp;(days)</c:set>
		<td class="moduleValue" colspan="2" nowrap><html-el:text title="${outlierDaysText}" property="outlierDays" styleId="outlierDaysId" styleClass="moduleEdit" size="3" maxlength="3"/>&nbsp;days</td>
	    </tr>
	</c:otherwise>
</c:choose>
</c:if>

<c:if test="${reportParamConfig[randomNumberOfRecordsParam] != null}">
    <tr><td colspan="3">&nbsp;</td></tr>
<c:choose>
	<c:when test="${reportInfoForm.reportIdNoSpace == 'QM11'}">
	    <tr id="randomNumberOfRecordsID">
			<td class="moduleLabel"><fw:label property="randomNumberOfRecords" forId="11randomNumberOfRecordsId"><bean-el:message key="label.report.randomNumberOfRecords" />:</fw:label></td>
			<c:set var="randomNumberOfRecordsText"><bean-el:message key="label.report.randomNumberOfRecords"/></c:set>
			<td class="moduleValue" colspan="2" nowrap><html-el:text title="${randomNumberOfRecordsText}" styleId="11randomNumberOfRecordsId" property="randomNumberOfRecords" styleClass="moduleEdit" size="3" maxlength="3"/>&nbsp;</td>
	    </tr>
	</c:when>
	<c:otherwise>
	    <tr>
			<td class="moduleLabel"><fw:label property="randomNumberOfRecords" forId="randomNumberOfRecordsId"><bean-el:message key="label.report.randomNumberOfRecords" />:</fw:label></td>
			<c:set var="randomNumberOfRecordsText"><bean-el:message key="label.report.randomNumberOfRecords"/></c:set>
			<td class="moduleValue" colspan="2" nowrap><html-el:text title="${randomNumberOfRecordsText}" styleId="randomNumberOfRecordsId" property="randomNumberOfRecords" styleClass="moduleEdit" size="3" maxlength="3"/>&nbsp;</td>
	    </tr>
	</c:otherwise>
</c:choose>
</c:if>

<c:if test="${reportParamConfig[enrollmentStatusComponentParam] != null}">
    <esrcore:setLookup var="ReportEnrollmentStatusComponentList" className="gov.va.med.esr.common.model.lookup.EnrollmentStatusComponent" />
    <tr><td colspan="3">&nbsp;</td></tr>
    <tr id="enrollmentStatusComponentId">
    	<td class="moduleLabel" style="vertical-align: top"><fw:label property="enrollmentStatusComponent" forId="enrollmentStatusComponentId"><bean-el:message key="label.report.enrollmentStatusComponent" />:</fw:label></td>
    	<td class="moduleValue" colspan="2">
    	  <table border="0" cellpadding="0" cellspacing="0">
	    <c:set var="enrollmentStatusComponentAllText"><bean-el:message key="label.report.enrollmentStatusComponent"/>&nbsp;(<bean-el:message key="label.report.all" />)</c:set>
	    <tr><td><html-el:multibox title="${enrollmentStatusComponentAllText}" styleId="enrollmentStatusComponentId" property="enrollmentStatusComponent" value="${ALL}" onclick="checkAll(this)" /></td><td colspan="2" class="moduleValue"><bean-el:message key="label.report.all" /></td></tr>
	    <c:forEach var="item" items="${ReportEnrollmentStatusComponentList}">
		<c:set var="enrollmentStatusComponentText"><bean-el:message key="label.report.enrollmentStatusComponent"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
		<tr><td width="1%">&nbsp;&nbsp;</td><td><html-el:multibox title="${enrollmentStatusComponentText}" property="enrollmentStatusComponent" value="${item.code}" /></td><td class="moduleValue" width="99%"><c:out value="${item.description}" /></td></tr>
	    </c:forEach>
	  </table>
    	</td>
    </tr>
</c:if>

<c:if test="${reportParamConfig[currentStatusDays] != null}">
	<tr><td colspan="3">&nbsp;</td></tr>
		<tr>
		<td class="moduleLabel"><fw:label property="currentStatusDays" forId="currentStatusDaysId"><bean-el:message key="label.report.currentStatusDays" />:</fw:label></td>
		<c:set var="currentStatusDaysText"><bean-el:message key="label.report.currentStatusDays"/></c:set>
		<td class="moduleValue" colspan="2" nowrap><html-el:text title="${currentStatusDaysText}" styleId="currentStatusDaysId" property="currentStatusDays" styleClass="moduleEdit" size="3" maxlength="3"/>&nbsp;days</td>
	</tr>
</c:if>

<c:if test="${reportParamConfig[pendingEnrollmentStatusParam] != null}">
    <esrcore:setLookup var="PendingEnrollmentStatusList" className="gov.va.med.esr.ui.common.beans.PendingEnrollmentStatus" />
    <tr><td colspan="3">&nbsp;</td></tr>
    <tr>
    	<td class="moduleLabel" style="vertical-align: top"><fw:label property="pendingEnrollmentStatus" forId="pendingEnrollmentStatusId"><bean-el:message key="label.report.enrollmentStatus" />:</fw:label></td>
    	<td class="moduleValue" colspan="2">
    	  <table border="0" cellpadding="0" cellspacing="0">
	    <c:set var="enrollmentStatusAllText"><bean-el:message key="label.report.enrollmentStatus"/>&nbsp;(<bean-el:message key="label.report.all" />)</c:set>
	    <tr><td><html-el:multibox title="${enrollmentStatusAllText}" property="pendingEnrollmentStatus" styleId="pendingEnrollmentStatusId" value="${ALL}" onclick="checkAll(this)" /></td><td colspan="2" class="moduleValue"><bean-el:message key="label.report.all" /></td></tr>
	    <c:forEach var="item" items="${PendingEnrollmentStatusList}">
		<c:set var="enrollmentStatusText"><bean-el:message key="label.report.enrollmentStatus"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
		<tr><td width="1%">&nbsp;&nbsp;</td><td><html-el:multibox title="${enrollmentStatusAllText}" property="pendingEnrollmentStatus" value="${item.code}" /></td><td class="moduleValue" width="99%"><c:out value="${item.description}" /></td></tr>
	    </c:forEach>
	  </table>
    	</td>
    </tr>
</c:if>

<c:if test="${reportParamConfig[eligibilityFactorParam] != null}">
 <jsp:include page="reportParametersEligibilityFactor.jsp" flush="true" />
</c:if>
  
<c:choose>  
 <c:when test="${reportInfoForm.reportIdNoSpace == 'QM17'}">
	<!-- In Process Financial Assessments QM 17 -->
	<c:if test="${reportParamConfig[reportTypeParam] != null}">
		 <jsp:include page="reportParametersReportFormat.jsp" flush="true" />
	</c:if>
	<c:if test="${reportParamConfig[reportDetailByParam] != null}">
	    <esrcore:setLookup var="ReportDetailByList" className="gov.va.med.esr.common.model.lookup.ReportDetailBy" />
	    <tr><td colspan="3">&nbsp;</td></tr>
	    <tr id="reportDetailBy">
		<td class="moduleLabel" style="vertical-align: top"><bean-el:message key="label.required.prefix" />&nbsp;<bean-el:message key="label.report.reportDetailsBy" />:</td>
		<td class="moduleValue" colspan="2">
		  <table border="0" cellpadding="0" cellspacing="0">
		    <c:forEach var="item" items="${ReportDetailByList}">
		         <c:if test="${item.code != 3}">
			<c:set var="reportDetailsByText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.reportDetailsBy"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
			<tr><td><html-el:radio title="${reportDetailsByText}" property="reportDetailBy" styleId="reportDetailById_${item.code}" value="${item.code}" /></td><td class="moduleValue"><fw:label property="reportDetailBy" forId="reportDetailById_${item.code}"><c:out value="${item.description}" /></fw:label></td></tr>
			</c:if>
		    </c:forEach>
		  </table>
		</td>
	    </tr>
	</c:if>
  </c:when>
  <c:when test="${reportInfoForm.reportIdNoSpace == 'QM19' || reportInfoForm.reportIdNoSpace == 'QM25' }">
	<!-- QM 19 & QM 25 -->
	<c:if test="${reportParamConfig[reportTypeParam] != null}">
 		<jsp:include page="reportParametersReportFormat.jsp" flush="true" />
	</c:if>
	<c:if test="${reportParamConfig[messageTypeParam] != null}">
	    <esrcore:setLookup var="MessageTypeList" className="gov.va.med.esr.common.model.lookup.MessageType" />
	    <tr><td colspan="3">&nbsp;</td></tr>
	    <tr id="reportMsgType">
		<td class="moduleLabel"><fw:label required="true" property="messageType" forId="reportDetailById"><bean-el:message key="label.report.messageType" />:</fw:label></td>
			<td colspan="2" class="moduleValue" nowrap>
			<c:set var="messageTypeText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.messageType"/></c:set>
			    <html-el:select title="${messageTypeText}" styleClass="moduleEdit" property="messageType" styleId="reportDetailById">
			    <html-el:option value=""><bean-el:message key="label.select" /></html-el:option>
			    <c:forEach var="item" items="${MessageTypeList}">				
				<c:if test="${(reportInfoForm.reportIdNoSpace == 'QM19' && item.direction=='O') || (reportInfoForm.reportIdNoSpace == 'QM25' && item.direction=='I')}">
					    <html-el:option styleClass="moduleEdit" value="${item.code}"><c:out value="${item.codeDescription}"/></html-el:option>
				</c:if>
			    </c:forEach>
			    </html-el:select>
			</td>
	    </tr>
	</c:if>
  </c:when>
  <c:when test="${reportInfoForm.reportIdNoSpace == 'QM3'}">
	      <esrcore:setLookup var="ReportFormatList" className="gov.va.med.esr.common.model.lookup.ReportFormat" />
	      <tr><td colspan="3">&nbsp;</td></tr>
	      <tr>
		<td class="moduleLabel" style="vertical-align: top"><bean-el:message key="label.required.prefix" />&nbsp;<bean-el:message key="label.report.reportFormat" />:</td>
		<td class="moduleValue" colspan="2">
		  <table border="0" cellpadding="0" cellspacing="0">
		    <c:forEach var="item" items="${ReportFormatList}">
			<c:if test="${item.code != 3}">
			<c:set var="reportFormatText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.reportFormat"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
			<tr><td><html-el:radio title="${reportFormatText}" property="reportFormat" styleId="3reportFormatId_${item.code}" onclick="selectReportFormat('${item.code}','outlierDaysID', '');selectReportFormat('${item.code}','enrollmentStatusComponentId', '')" value="${item.code}" /></td><td class="moduleValue"><fw:label property="reportFormat" forId="3reportFormatId_${item.code}"><c:out value="${item.description}" /></fw:label></td></tr>
			  </c:if>
		    </c:forEach>
		  </table>
		</td>
	    </tr>
   </c:when>
   <c:when test="${reportInfoForm.reportIdNoSpace == 'QM10'}">
   	      <esrcore:setLookup var="ReportFormatList" className="gov.va.med.esr.common.model.lookup.ReportFormat" />
   	      <tr><td colspan="3">&nbsp;</td></tr>
   	      <tr>
   		<td class="moduleLabel" style="vertical-align: top"><bean-el:message key="label.required.prefix" />&nbsp;<bean-el:message key="label.report.reportFormat" />:</td>
   		<td class="moduleValue" colspan="2">
   		  <table border="0" cellpadding="0" cellspacing="0">
   		    <c:forEach var="item" items="${ReportFormatList}">
   			<c:if test="${item.code != 3}">
				   <c:set var="reportFormatText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.reportFormat"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
				   <tr><td><html-el:radio title="${reportFormatText}" property="reportFormat" styleId="10reportFormatId_${item.code}"
				    onclick="selectReportFormat('${item.code}','reportPeriodTypeQuarterlyId', 'reportPeriodTypeAllFiscalYearsId');selectReportFormat('${item.code}','reportPeriodTypeDateRangeId', '');selectReportFormatOption('${item.code}','QuarterlyId', 'AllFiscalYearsId');" value="${item.code}" /></td><td class="moduleValue"><fw:label property="reportFormat" forId="10reportFormatId_${item.code}"><c:out value="${item.description}" /></fw:label></td></tr>
   			</c:if>				   
   		    </c:forEach>
   		  </table>
   		</td>
   	    </tr>
   </c:when>		
   <c:when test="${reportInfoForm.reportIdNoSpace == 'QM11'}">
   	      <esrcore:setLookup var="ReportFormatList" className="gov.va.med.esr.common.model.lookup.ReportFormat" />
   	      <tr><td colspan="3">&nbsp;</td></tr>
   	      <tr>
   		<td class="moduleLabel" style="vertical-align: top"><bean-el:message key="label.required.prefix" />&nbsp;<bean-el:message key="label.report.reportFormat" />:</td>
   		<td class="moduleValue" colspan="2">
   		  <table border="0" cellpadding="0" cellspacing="0">
   		    <c:forEach var="item" items="${ReportFormatList}">
   			<c:if test="${item.code != 3}">
   			<c:set var="reportFormatText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.reportFormat"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
   			<tr><td><html-el:radio title="${reportFormatText}" property="reportFormat" styleId="11reportFormatId_${item.code}" onclick="selectReportFormat('${item.code}','outlierDaysID', '');selectReportFormat('${item.code}','randomNumberOfRecordsID', '')" value="${item.code}" /></td><td class="moduleValue"><fw:label property="reportFormat" forId="11reportFormatId_${item.code}"><c:out value="${item.description}" /></fw:label></td></tr>
   			  </c:if>
   		    </c:forEach>
   		  </table>
   		</td>
   	    </tr>
   </c:when>
  <c:when test="${reportInfoForm.reportIdNoSpace == 'EED9'}">
	<!-- In Process Financial Assessments QM 17 -->
	
	    <esrcore:setLookup var="ReportFormatList" className="gov.va.med.esr.common.model.lookup.ReportFormat" />
	    <tr><td colspan="3">&nbsp;</td></tr>
	    <tr>
		<td class="moduleLabel" style="vertical-align: top"><bean-el:message key="label.required.prefix" />&nbsp;<bean-el:message key="label.report.reportFormat" />:</td>
		<td class="moduleValue" colspan="2">
		  <table border="0" cellpadding="0" cellspacing="0">
		    <c:forEach var="item" items="${ReportFormatList}">
			<c:if test="${item.code != 3}">
			<c:set var="reportFormatText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.reportFormat"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
			<tr><td><html-el:radio title="${reportFormatText}" property="reportFormat" styleId="9reportFormatId_${item.code}" onclick="selectReportFormat('${item.code}','reportDetailBy', ''); selectReportDetailBy('${item.code}','reportUserId')" value="${item.code}" /></td><td class="moduleValue"><fw:label property="reportFormat" forId="9reportFormatId_${item.code}"><c:out value="${item.description}" /></fw:label></td></tr>
			</c:if>
		    </c:forEach>
		  </table>
		</td>
	    </tr>
	
	<c:if test="${reportParamConfig[reportDetailByParam] != null}">
	    <esrcore:setLookup var="ReportDetailByList" className="gov.va.med.esr.common.model.lookup.ReportDetailBy" />
	    <tr><td colspan="3">&nbsp;</td></tr>
	    <tr id="reportDetailBy">
		<td class="moduleLabel" style="vertical-align: top"><bean-el:message key="label.report.reportDetailsBy" />:</td>
		<td class="moduleValue" colspan="2">
		  <table border="0" cellpadding="0" cellspacing="0">
		    <c:forEach var="item" items="${ReportDetailByList}">
		         <c:if test="${item.code != 1}">
			<c:set var="reportDetailsByText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.reportDetailsBy"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
			<tr><td><html-el:radio title="${reportDetailsByText}" property="reportDetailBy" styleId="reportDetailById_${item.code}" onclick="selectReportDetailBy('${item.code}','reportUserId')" value="${item.code}" /></td><td class="moduleValue"><fw:label property="reportDetailBy" forId="reportDetailById_${item.code}"><c:out value="${item.description}" /></fw:label></td></tr>
			</c:if>
		    </c:forEach>
		  </table>
		</td>
	    </tr>
	</c:if>
	
      <c:if test="${reportParamConfig[userParam] != null}">
	       <jsp:include page="reportParametersUser.jsp" flush="true" />
       </c:if>
    
	<c:if test="${reportParamConfig[enrollmentOverrideReasonParam] != null}">
	    <esrcore:setLookup var="enrollmentOverrideReasonList" className="gov.va.med.esr.common.model.lookup.EnrollmentOverrideReason" />
	    <tr><td colspan="3">&nbsp;</td></tr>
	    <tr>
	    	<td class="moduleLabel" style="vertical-align: top"><fw:label required="false" property="enrollmentOverrideReason" forId="enrollmentOverrideReasonId"><bean-el:message key="label.report.enrollmentOverrideReason" />:</fw:label></td>
	    	<td class="moduleValue" colspan="2">
	    	  <table border="0" cellpadding="0" cellspacing="0">
	    	  <c:set var="enrollmentOverrideReasonAllText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.enrollmentOverrideReason"/>&nbsp;(<bean-el:message key="label.report.all" />)</c:set>
	    	    <tr><td><html-el:multibox title="${enrollmentOverrideReasonAllText}" property="enrollmentOverrideReason" styleId="enrollmentOverrideReasonId" value="${ALL}" onclick="checkAll(this)" /></td><td colspan="2" class="moduleValue"><bean-el:message key="label.report.all" /></td></tr>
	    	    <c:forEach var="item" items="${enrollmentOverrideReasonList}">
			<c:set var="enrollmentOverrideReasonText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.enrollmentOverrideReason"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
			<tr><td width="1%">&nbsp;&nbsp;</td><td><html-el:multibox title="${enrollmentOverrideReasonText}" property="enrollmentOverrideReason" value="${item.code}" /></td><td class="moduleValue" width="99%"><c:out value="${item.description}" /></td></tr>
		    </c:forEach>
		  </table>
	    	</td>
	    </tr>
	</c:if>
  </c:when>
   <c:when test="${reportInfoForm.reportIdNoSpace == 'EED12'}">
	<c:if test="${reportParamConfig[reportTypeParam] != null}">
		    <esrcore:setLookup var="ReportFormatList" className="gov.va.med.esr.common.model.lookup.ReportFormat" />
		    <tr><td colspan="3">&nbsp;</td></tr>
		    <tr>
			<td class="moduleLabel" style="vertical-align: top"><bean-el:message key="label.required.prefix" />&nbsp;<bean-el:message key="label.report.reportFormat" />:</td>
			<td class="moduleValue" colspan="2">
			  <table border="0" cellpadding="0" cellspacing="0">
			    <c:forEach var="item" items="${ReportFormatList}">
				<c:set var="reportFormatText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.reportFormat"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
				<tr><td><html-el:radio title="${reportFormatText}" property="reportFormat" styleId="12reportFormatId_${item.code}" onclick="selectReportFormat('${item.code}','reportUserId', '');selectReportFormat('${item.code}','personMergeStatusId', '')" value="${item.code}" /></td><td class="moduleValue"><fw:label property="reportFormat" forId="12reportFormatId_${item.code}"><c:out value="${item.description}" /></fw:label></td></tr>
			    </c:forEach>
			  </table>
			</td>
		    </tr>
	</c:if>

    <c:if test="${reportParamConfig[userParam] != null}">
       <jsp:include page="reportParametersUser.jsp" flush="true" />
    </c:if>
    <c:if test="${reportParamConfig[personMergeStatusParam] != null}">
    <esrcore:setLookup var="ReportPersonMergeStatusList" className="gov.va.med.esr.common.model.lookup.PersonMergeStatus" />
    <tr><td colspan="3">&nbsp;</td></tr>
    <tr id="personMergeStatusId">
    	<td class="moduleLabel" style="vertical-align: top"><fw:label property="personMergeStatus" forId="personMergeStatusId"><bean-el:message key="label.report.personMergeStatus" />:</fw:label></td>
    	<td class="moduleValue" colspan="2">
    	  <table border="0" cellpadding="0" cellspacing="0">
	    <c:set var="personMergeStatusAllText"><bean-el:message key="label.report.personMergeStatus"/>&nbsp;(<bean-el:message key="label.report.all" />)</c:set>
	    <tr><td><html-el:multibox title="${personMergeStatusAllText}" property="personMergeStatus" styleId="personMergeStatusId" value="${ALL}" onclick="checkAll(this)" /></td><td colspan="2" class="moduleValue"><bean-el:message key="label.report.all" /></td></tr>
	    <c:forEach var="item" items="${ReportPersonMergeStatusList}">
		<c:set var="personMergeStatusText"><bean-el:message key="label.report.personMergeStatus"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
		<tr><td width="1%">&nbsp;&nbsp;</td><td><html-el:multibox title="${personMergeStatusText}" property="personMergeStatus" value="${item.code}" /></td><td class="moduleValue" width="99%"><c:out value="${item.description}" /></td></tr>
	    </c:forEach>
	  </table>
    	</td>
    </tr>
    </c:if>
  </c:when>
  
    <c:when test="${reportInfoForm.reportIdNoSpace == 'EED19'}">
	<c:if test="${reportParamConfig[reportTypeParam] != null}">
		    <esrcore:setLookup var="ReportFormatList" className="gov.va.med.esr.common.model.lookup.ReportFormat" />
		    <tr><td colspan="3">&nbsp;</td></tr>
		    <tr>
			<td class="moduleLabel" style="vertical-align: top"><bean-el:message key="label.required.prefix" />&nbsp;<bean-el:message key="label.report.reportFormat" />:</td>
			<td class="moduleValue" colspan="2">
			  <table border="0" cellpadding="0" cellspacing="0">
			    <c:forEach var="item" items="${ReportFormatList}">
	    			<c:if test="${item.code != 3}">
					    <c:set var="reportFormatText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.reportFormat"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
					<tr><td><html-el:radio title="${reportFormatText}" property="reportFormat" styleId="19reportFormatId_${item.code}" onclick="selectReportFormat('${item.code}','reportUserId', '');selectReportFormat('${item.code}','personMergeStatusId', '')" value="${item.code}" /></td><td class="moduleValue"><fw:label property="reportFormat" forId="19reportFormatId_${item.code}"><c:out value="${item.description}" /></fw:label></td></tr>
				    </c:if>
			    </c:forEach>
			  </table>
			</td>
		    </tr>
	</c:if>

 
    <c:if test="${reportParamConfig[userParam] != null}">
       <jsp:include page="reportParametersUser.jsp" flush="true" />
    </c:if>

  </c:when>
  
  <c:when test="${reportInfoForm.reportIdNoSpace == 'COR1'}">
	    <esrcore:setLookup var="ReportFormatList" className="gov.va.med.esr.common.model.lookup.ReportFormat" />
	    <tr><td colspan="3">&nbsp;</td></tr>
	    <tr>
		<td class="moduleLabel" style="vertical-align: top"><bean-el:message key="label.required.prefix" />&nbsp;<bean-el:message key="label.report.reportFormat" />:</td>
		<td class="moduleValue" colspan="2">
		  <table border="0" cellpadding="0" cellspacing="0">
		    <c:forEach var="item" items="${ReportFormatList}">
			<c:if test="${item.code != 3}">
			<c:set var="reportFormatText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.reportFormat"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
			<tr><td><html-el:radio title="${reportFormatText}" property="reportFormat" styleId="cor1reportFormatId_${item.code}" onclick="selectReportFormat('${item.code}','letterFileId', ''); selectLetterFile()" value="${item.code}" /></td><td class="moduleValue"><fw:label property="reportFormat" forId="cor1reportFormatId_${item.code}"><c:out value="${item.description}" /></fw:label></td></tr>
			</c:if>
		    </c:forEach>
		  </table>
		</td>
	    </tr>
		<c:if test="${reportParamConfig[letterRejectErrorReasonParam] != null}">
			 <jsp:include page="reportParametersLetterRejectErrorReason.jsp" flush="true" />
		</c:if>
  </c:when>
  <c:otherwise>
    <c:if test="${reportParamConfig[reportTypeParam] != null}">
 		<jsp:include page="reportParametersReportFormat.jsp" flush="true" />
    </c:if>
  </c:otherwise>
</c:choose>
<c:if test="${reportParamConfig[fileTypeParam] != null}">
    <esrcore:setLookup var="ReportExportedTypeList" className="gov.va.med.fw.report.ReportExportedType" />
    <tr><td colspan="3">&nbsp;</td></tr>
    <tr>
    	<td class="moduleLabel" style="vertical-align: top"><bean-el:message key="label.required.prefix" />&nbsp;<bean-el:message key="label.report.fileType" />:</td>
    	<td class="moduleValue" colspan="2">
    	  <table border="0" cellpadding="0" cellspacing="0" role="presentation">
    	    <c:forEach var="item" items="${ReportExportedTypeList}">
		<c:set var="fileTypeText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.report.fileType"/>&nbsp;(<c:out value="${item.description}" />)</c:set>
		<tr><td><html-el:radio title="${fileTypeText}" property="fileType" styleId="fileTypeId_${item.code}" value="${item.code}" /></td><td class="moduleValue"><fw:label property="fileType" forId="fileTypeId_${item.code}"><c:out value="${item.description}" /></fw:label></td></tr>
	    </c:forEach>
	  </table>
    	</td>
    </tr>
</c:if>
