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

<html xhtml="true">
<head>
<title>Print Patient Details</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="left" class="printPatientSectionTitle">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"><c:out value="${centralHubHospital.hospitalName}"/> 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">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="left" class="printPatientSectionTitle">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">Reg.Disabled:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.registeredDisabled}"/></td>
			</tr>
			</c:if>
			
			<tr><td align="left" class="printPatientSectionTitle">Referrals Details</td></tr>
			<tr>
				<td class="printFormDefinitionPropertyName">Referred To Clinician:</td>
				<td class="printFormDefinitionPropertyValue">
					<c:out value="${emdt.currentCareSpell.primaryClinician.username}"/>
				
			</td>
			</tr>
			
			<tr><td align="left" class="printPatientSectionTitle">Referring Specialist Details</td></tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Job Title:</td>
				<td class="printFormDefinitionPropertyValue">
					<c:out value="${emdt.currentCareSpell.referralDetails.referringSpecialistJobTitle}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Name:</td>
				<td class="printFormDefinitionPropertyValue">
					<c:out value="${emdt.currentCareSpell.referralDetails.referringSpecialistUser.name}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">OverSeas or Private Patient:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.overseasVisitor}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">SurName:</td>
				<td class="printFormDefinitionPropertyValue">
					<c:out value="${emdt.currentCareSpell.referralDetails.referringSpecialistUser.surname}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">FirstName:</td>
				<td class="printFormDefinitionPropertyValue">
					<c:out value="${emdt.currentCareSpell.referralDetails.referringSpecialistUser.forename}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">Telephone:</td>
				<td class="printFormDefinitionPropertyValue">
					<c:out value="${emdt.currentCareSpell.referralDetails.referringSpecialistTelephone}"/></td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">Fax:</td>
				<td class="printFormDefinitionPropertyValue">
					<c:out value="${emdt.currentCareSpell.referralDetails.referringSpecialistFax}"/></td>
			</tr>
			
			<tr>
				<td class="printFormDefinitionPropertyName">EmailAddress:</td>
				<td class="printFormDefinitionPropertyValue">
					<c:out value="${emdt.currentCareSpell.referralDetails.referringSpecialistUser.email}"/></td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">Address:</td>
				<td class="printFormDefinitionPropertyValue">
					<c:out value="${emdt.currentCareSpell.referralDetails.referringSpecialistAddress}"/></td>
			</tr>
			<tr>
				<td class="printFormDefinitionPropertyName">PostCode:</td>
				<td class="printFormDefinitionPropertyValue">
					<c:out value="${emdt.currentCareSpell.referralDetails.referringSpecialistPostcode}"/></td>
			</tr>
			
			<tr><td align="left" class="printPatientSectionTitle">GP Details</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="printFormDefinit.alue"><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">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>
			
						
			<c:if test="${emdt.prefShowPatientInfoNextOfKin}">
			
			<tr><td align="left" class="printPatientSectionTitle">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 TelephoneNumber:</td>
				<td class="printFormDefinitionPropertyValue"><c:out value="${emdt.patient.nokTelephoneNumber1}"/></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">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>
</div>
</body>
</html>