<%@ 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.common.model.lookup.RegistryType' %>

<table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleShell" role="presentation">
<html-el:form action="/loadRegistry" method="post">
  <%@ include file="/admin/csrfgentoken.jsp" %>
  <tr>
    <td width="100%">
      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleShellTableBody" role="presentation">
        <tr>
          <td>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleShellTableHead" role="presentation">
              <tr>
                <td class="moduleBlueBox"><img alt=""  src="../images/spacer.gif" width="28" height="23"/></td>
                <td class="moduleHeadline"><bean-el:message key="title.registry.fileLoadStatistics" /></td>
              </tr>
            </table>
          </td>
        </tr>

        <tr>
          <td class="moduleValue">
            <c:set var="phRegistryType"><%=RegistryType.CODE_PH_REGISTRY.getCode()%></c:set>
            <c:set var="powRegistryType"><%=RegistryType.CODE_POW_REGISTRY.getCode()%></c:set>
            <c:set var="shadRegistryType"><%=RegistryType.CODE_SHAD_REGISTRY.getCode()%></c:set>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="moduleShellTableBody" role="presentation">
              <tr>
                <td class="moduleLabel" width="45%"><bean-el:message key="label.required.prefix" />&nbsp;<bean-el:message key="label.registryType" />:</td>
                <td class="moduleValue" width="55%">
                 <c:set var="phRegistryText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.registryType"/>&nbsp;(<esrcore:displayLookupValue lookupType="gov.va.med.esr.common.model.lookup.RegistryType" name="phRegistryType" />)</c:set>
                 <c:set var="powRegistryText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.registryType"/>&nbsp;(<esrcore:displayLookupValue lookupType="gov.va.med.esr.common.model.lookup.RegistryType" name="powRegistryType" />)</c:set>
                 <c:set var="shadRegistryText"><bean-el:message key="label.required" />,&nbsp;<bean-el:message key="label.registryType"/>&nbsp;(<esrcore:displayLookupValue lookupType="gov.va.med.esr.common.model.lookup.RegistryType" name="shadRegistryType" />)</c:set>
 
                  <table border="0" cellpadding="0" cellspacing="0" role="presentation">
                    <tr>
                      <td class="moduleValue" nowrap><html-el:radio title="${phRegistryText}" property="registryType" styleId="phRegistryType" value="${phRegistryType}" /><fw:label property="registryType" forId="phRegistryType"><esrcore:displayLookupValue lookupType="gov.va.med.esr.common.model.lookup.RegistryType" name="phRegistryType" /></fw:label></td>
                      <td class="moduleValue" nowrap><html-el:radio title="${powRegistryText}" property="registryType" styleId="powRegistryTypeId" value="${powRegistryType}" /><fw:label property="registryType" forId="powRegistryTypeId"><esrcore:displayLookupValue lookupType="gov.va.med.esr.common.model.lookup.RegistryType" name="powRegistryType" /></fw:label></td>
                      <td class="moduleValue" nowrap><html-el:radio title="${shadRegistryText}" property="registryType" styleId="shadRegistryTypeId" value="${shadRegistryType}" /><fw:label property="registryType" forId="shadRegistryTypeId"><esrcore:displayLookupValue lookupType="gov.va.med.esr.common.model.lookup.RegistryType" name="shadRegistryType" /></fw:label></td>
                    </tr>
                  </table>
                </td>
              </tr>
              <tr><td colspan="2">&nbsp;</td></tr>
              <tr>
	       <td class="moduleLabel"><bean-el:message key="label.registry.registryImportDate" />:</td>
	       <td class="moduleValue"><esrcore:displayDate name="loadRegistrySummary" dateProperty="createdOn" displayTime="true"  nullText=""/></td>
              </tr>
              <tr>
	       <td class="moduleLabel"><bean-el:message key="label.registry.importType" />:</td>
	       <td class="moduleValue"><c:out value="${loadRegistrySummary.registryType.description}" /></td>
              </tr>
              <tr>
               <td class="moduleLabel"><bean-el:message key="label.registry.numberOfRecordsRead" />:</td>
               <td class="moduleValue"><c:out value="${loadRegistrySummary.recordsRead}" /></td>
              </tr>
              <tr>
	       <td class="moduleLabel"><bean-el:message key="label.registry.numberPassingConsistencyCheck" />:</td>
	       <td class="moduleValue"><c:out value="${loadRegistrySummary.recordsPassedConsistencyCheck}" /></td>
              </tr>
              <tr>
               <td class="moduleLabel"><bean-el:message key="label.registry.numberNotMatchedToExistingRecords" />:</td>
               <td class="moduleValue"><c:out value="${loadRegistrySummary.recordsNotMatchedToExistingRecords}" /></td>
              </tr>
              <tr>
               <td class="moduleLabel"><bean-el:message key="label.registry.numberAmbigiouslyMatched" />:</td>
               <td class="moduleValue"><c:out value="${loadRegistrySummary.recordsAmbiguouslyMatched}" /></td>
              </tr>
              <tr>
               <td class="moduleLabel"><bean-el:message key="label.registry.numberOfRecordsInserted" />:</td>
               <td class="moduleValue"><c:out value="${loadRegistrySummary.newRegistryEntriesInserted}" /></td>
              </tr>
              <tr>
	       <td class="moduleLabel"><bean-el:message key="label.registry.numberMatchedToExistingRecords" />:</td>
	       <td class="moduleValue"><c:out value="${loadRegistrySummary.recordsMatchedToExistingRecords}" /></td>
              </tr>
              <tr>
                <td colspan="2" class="moduleValue">
                  <br>
                  <table border="0" align="center" cellspacing="0" cellpadding="0" role="presentation">
                    <tr>
                      <td width="45%"><img alt=""  src="../images/spacer.gif"/></td>
                      <td><img alt=""  src="../images/buttonEndLeft.gif"/></td>
                      <td><html-el:submit property="methodName" style="width:50; vertical-align: top;" styleClass="buttonText"><bean-el:message key="button.refresh"/></html-el:submit></td>
                      <td><img alt=""  src="../images/buttonEndRight.gif"/></td>
                      <td width="1%"><img alt=""  src="../images/spacer.gif"/></td>
                      <td><img alt=""  src="../images/buttonEndLeft.gif"/></td>
                      <td><html-el:submit property="methodName" style="width:50; vertical-align: top;" styleClass="buttonText"><bean-el:message key="button.cancel"/></html-el:submit></td>
                      <td><img alt=""  src="../images/buttonEndRight.gif"/></td>
                      <td width="45%"><img alt=""  src="../images/spacer.gif"/></td>
                    </tr>
                  </table>
                  <br>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</html-el:form>
</table>
