<%@ include file="/includes.jsp"%>

<html xhtml="true">
<head>
<title>Print Form</title>
<link rel="stylesheet" href="../webapp.css" type="text/css" />
<c:if test="${not empty definition.colourCode}">
	<style>
		.formBgColor {
			background-color: ${definition.colourCode}
		}
	</style>
</c:if>
</head>
<body onload="window.print()">
<div class="printFormPart" align="center">
<div class="printFormDefinition" align="left">

<table width="100%">
		<tr><td align="center" style="font-size: 20px;">Patient Details</td></tr>
			<tr>
				<td class="printFormDefinitionPropertyName">NHS Number:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.nhsNumber}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Hospital Number:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.hospitalNumber}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Patient Name:</td>
				
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.title}"/> <c:out value="${emdt.patient.forename}"/> <c:out value="${emdt.patient.surname}"/></td>
			</tr>
			
			
			<tr>
				<td class="printFormDefinitionPropertyName">Date of Birth:</td>
				<td class="printFormDefinitionPropertyValue"><fmt:formatDate value="${emdt.patient.dateOfBirth }" pattern="dd/MM/yyyy"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Date of Death:</td>
				<td class="printFormDefinitionPropertyValue"><fmt:formatDate value="${emdt.patient.dateOfDeath }" pattern="dd/MM/yyyy"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Sex:</td>
				<td><webapp:namedList name="SexCode" domain="EMDT" id="sex"/>
				<c:forEach var="pair" items="${sex.pairIterator}">
					<c:if test="${pair.first eq emdt.patient.sex}">
						<c:out value="${pair.second}"/>
					</c:if>
				</c:forEach>
				</td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Address:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.address}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">PostCode:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.postcode}"/></td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">Country:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.country}"/></td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">HomePhone:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.homePhoneNumber}"/></td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">MobilePhone:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.mobilePhoneNumber}"/></td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">EmailAddress:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.emailAddress}"/></td>
			</tr>
			
			 <c:if test="${emdt.prefShowPatientInfoExtraDemographics}">
	          <tr><td align="center" style="font-size: 20px;">Additional Patient Details</td></tr>
			<tr>
				<td class="printFormDefinitionPropertyName">MaritalStatus:</td>
				<td><webapp:namedList name="MaritalStatus" domain="EMDT" id="marSta"/>
				<c:forEach var="pair" items="${marSta.pairIterator}">
					<c:if test="${pair.first eq emdt.patient.maritalStatus}">
						<c:out value="${pair.second}"/>
					</c:if>
				</c:forEach>
				</td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">Nationality:</td>
				<td><webapp:namedList name="Nationality" domain="EMDT" id="nat"/>
				<c:forEach var="pair" items="${nat.pairIterator}">
					<c:if test="${pair.first eq emdt.patient.nationality}">
						<c:out value="${pair.second}"/>
					</c:if>
				</c:forEach>
				</td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">Language:</td>
				<td><webapp:namedList name="Language" domain="EMDT" id="lan"/>
				<c:forEach var="pair" items="${lan.pairIterator}">
					<c:if test="${pair.first eq emdt.patient.language}">
						<c:out value="${pair.second}"/>
					</c:if>
				</c:forEach>
				</td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">Religion:</td>
				<td><webapp:namedList name="Religion" domain="EMDT" id="rel"/>
				<c:forEach var="pair" items="${rel.pairIterator}">
					<c:if test="${pair.first eq emdt.patient.religion}">
						<c:out value="${pair.second}"/>
					</c:if>
				</c:forEach>
				</td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">Ethnic Group:</td>
				<td><webapp:namedList name="Ethnicity" domain="EMDT" id="eth"/>
				<c:forEach var="pair" items="${eth.pairIterator}">
					<c:if test="${pair.first eq emdt.patient.ethnicity}">
						<c:out value="${pair.second}"/>
					</c:if>
				</c:forEach>
				</td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">Occupation:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.occupation}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">OverSeasVisitor:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.overseasVisitor}"/></td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">Reg.Disabled:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.registeredDisabled}"/></td>
			</tr>
			</c:if>
			
			<tr><td align="center" style="font-size: 20px;">GP Details</td></tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Admitting Physician:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.admittingPhysicianUserName}"/></td>
			</tr>
			<tr>
			<td class="printFormDefinitionPropertyName">GP List:</td>
			<td><webapp:namedList name="GP List" domain="DATABASE" id="nl"/>
				<c:forEach var="pair" items="${nl.pairIterator}">
					<c:if test="${pair.first eq emdt.patient.gpGmpCode}">
						<c:out value="${pair.second}"/>
					</c:if>
				</c:forEach>
				</td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">GMPCode:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.gpGmpCode}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">GPName:</td>
				<td class="printFormDefinitionPropertyValue"><<c:out value="${emdt.patient.gpForename}"/> <c:out value="${emdt.patient.gpSurname}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Telephone:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.gpTelephoneNumber}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Fax Number:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.gpFaxNumber}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Email Address:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.gpEmailAddress}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Practice Name:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.gpPracticeName}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Practice Code:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.gpPracticeCode}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Surgery Address:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.gpSurgeryAddress}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Post Code:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.gpPostcode}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">PCT Name:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.gpPctName}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">PCT Code:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.gpPctCode}"/></td>
			</tr>
			
			<c:if test="${emdt.prefShowPatientInfoNextOfKin}">
			
			<tr><td align="center" style="font-size: 20px;">Next Of Kin Details</td></tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">NOK Name:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.nokForenames}"/> <c:out value="${emdt.patient.nokSurname}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">NOK TelephoneNumber1:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.nokTelephoneNumber1}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">NOK TelephoneNumber2:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.nokTelephoneNumber2}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Address:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.nokAddress}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">PostCode:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.nokPostcode}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Country:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.nokCountry}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Relationship To Patient:</td>
				<td><webapp:namedList name="PatientNOKRelationship" domain="EMDT" id="nokRel"/>
				<c:forEach var="pair" items="${nokRel.pairIterator}">
					<c:if test="${pair.first eq emdt.patient.nokRelationship}">
						<c:out value="${pair.second}"/>
					</c:if>
				</c:forEach>
				</td>
			</tr>
			</c:if>
			</table>
			
		
<br />
<br />
</div>
</body>
</html>