<?xml version="1.0" encoding="UTF-8" ?>
<%@ include file="/includes.jsp" %>
<form:useForm id="cn" name="ClinicalAssessment"/>
<form:useForm id="rc" name="RectalClinic"/>
<c:set var="patient" value="${emdt.patient}"/><c:out value="${patient}"/>
<jsp:useBean id="today" class="java.util.Date"/>
<% pageContext.setAttribute("newline", "\n"); %>
<letter>
	<p align="left">
	Ref: <c:out value="${patient.hospitalNumber}"/>/(clinic initial-RC)
	</p>
		<webapp:itextImage url="../images/NhsLogo.png" align="right"/>
	
	<br/>
	
<table width="100%" borderwidth="0">
<row>
<cell>
<!--  GP address -->
		<p align="left"><br/>
		To:<br/>
		<c:out value="${patient.gpForename}"/> <c:out value="${patient.gpSurname}"/><br/>
		${fn:replace(patient.gpSurgeryAddress, newline, "<br/>") }<br/>
		<c:out value="${patient.gpPostcode}"/><br/>
		</p>	 	

</cell>
<cell>
<!-- Senders Name -->		
	<p align="right"><br/>
	Example Hospital<br/>
	London<br/>
	W1 1AA<br/>
	<br/>
	Direct Line:  0207 000 0000<br/>
	</p>
<!-- Senders Name -->

</cell>
</row>
</table>

	 	<br/>
	 	
<!-- Todays date -->
 	<p align="right"><fmt:formatDate value="${today}" pattern="dd MMM yyyy" /></p>
<!-- Todays date -->
 	<br/>
 	<br/>
 	<p >Dr. <c:out value="${patient.gpSurname}"/>,</p>
 	<br/>
 	<p >
		<b>Re: <c:out value="${patient.fullName}"/>, Hospital No. <c:out value="${patient.hospitalNumber}"/></b><br/>
		<c:set var="address" value="${fn:replace(patient.address, newline, '<br/>') }"></c:set>
		Address:<br/> <c:out value="${address}"/>
		 		<br/><br/>
 		Thank for referring this (routine/urgent /2WW) patient to the rectal clinic.<logic:equal name="patient" property="sex" value="01"> His </logic:equal> <logic:equal name="patient" property="sex" value="02"> Her </logic:equal> 
 		main problems was <form:write name="rc" property="RCP1S2PC"/> of <form:write name="rc" property="RCP1S2PCduration"/> duration. <logic:equal name="patient" property="sex" value="01"> He </logic:equal> <logic:equal name="patient" property="sex" value="02"> She </logic:equal>
 		 also complained of <form:equal name="rc" property="RCP1S2RectalbleedYN" value="yes"> rectal bleeding</form:equal> <form:equal name="rc" property="RCP1S2CBHYN" value="yes">, change in bowel habit</form:equal> <form:write name="rc" property="RCP1S2GIsymptoms" ifEmpty="Not Spe}ied"/>
		<br/>
		<logic:equal name="patient" property="sex" value="01"> He </logic:equal> <logic:equal name="patient" property="sex" value="02"> She </logic:equal>
		denied <form:equal name="rc" property="RCP1S2RectalbleedYN" value="no"> rectal bleeding</form:equal> <form:equal name="rc" property="RCP1S2CBHYN" value="no">, change in bowel habit</form:equal>
		There was <form:equal name="rc" property="RCP1S2PCFHCRC" value="no"> no </form:equal>family history of bowel cancer.<form:write name="rc" property="RCP1S2PcFHCRC"/>
 		
		<form:present name="rc" property="RCP2MHPastMedHist">
		<br/>
		Their past medical history included <form:write name="rc" property="RCP2MHPastMedHist"/>
  		</form:present>
		<form:present name="rc" property="RCP2MHOperations">
		<br/>
		They have had the following operations <form:write name="rc" property="RCP2MHOperations"/>
		</form:present>
		<form:notPresent name="rc" property="RCP2MHOperations">
		<br/>
		They have had undergone no operations.
		</form:notPresent>
<br/>
On examination
<br/>
General findings: <form:notPresent name="rc" property="RCP3GFGenFind">none</form:notPresent> <form:present name="rc" property="RCP3GFGenFind"><form:write name="rc" property="RCP3GFGenFind"/></form:present>

<form:equal name="rc" property="RCP3AFSiteabdpain" value="tenderness">
		<br/>
		There was tenderness in <form:write name="rc" property="RCP3AFSiteabdpain"/>
  		</form:equal>
<form:equal name="rc" property="RCP3AFSiteabdpain" value="guarding">
		<br/>
		There was abdominal pain and guarding in <form:write name="rc" property="RCP3AFSiteabdpain"/>
  		</form:equal>
<form:equal name="rc" property="RCP3GFScarsYN" value="n">
<form:equal name="rc" property="RCP3GFHernia" value="n">
<form:equal name="rc" property="RCP3AFmassYN" value="n">
<form:equal name="rc" property="RCP3AFOrganomegaly" value="n">
		<br/>
		On abdominal examination there were no abdominal scars, masses, herniae or organomegaly.
  		</form:equal>
		</form:equal>
		</form:equal>
		</form:equal>
<form:present name="rc" property="RCP3GFScars">
		<br/>
		Scars - <form:write name="rc" property="RCP3GFScars"/>
		</form:present>
<form:present name="rc" property="RCP3GFHernialist">
		<br/>
		Hernia - <form:write name="rc" property="RCP3GFHernialist"/>
		</form:present>
<form:present name="rc" property="RCP3AFSiteabdmass">
		<br/>
		Masses - <form:write name="rc" property="RCP3AFSiteabdmass"/>
		</form:present>
<form:present name="rc" property="RCP3AFOrnaomegaly">
		<br/>
		Ornaomegaly - <form:write name="rc" property="RCP3AFOrnaomegaly"/>
		</form:present>
<br/>
Anorectal assessment:
<br/>
<form:present name="rc" property="RCP4ARAPerineum">
		<br/>
		Perineum - <form:write name="rc" property="RCP4ARAPerineum"/>
		</form:present>
<!-- PR Exam -->
<form:present name="rc" property="RCP4ARAPR">
		<br/>
		PR Exam - <form:equal name="rc" property="RCP4ARAPR" value="not performed">not performed</form:equal>
					<form:equal name="rc" property="RCP4ARAPR" value="performed">silent, </form:equal>
					<form:write name="rc" property="RCP4ARAPRassess"/>
		</form:present>
<!-- PR Exam -->
<!-- Proctoscopy -->
<form:present name="rc" property="RCP4ARAProctoscopy">
		<br/>
		Proctoscopy - <form:equal name="rc" property="RCP4ARAProctoscopy" value="not performed">not performed</form:equal>
					<form:equal name="rc" property="RCP4ARAProctoscopy" value="performed">silent, </form:equal>
					<form:write name="rc" property="RCP4ARAProctfind"/>
		</form:present>
<!-- Proctoscopy -->
<!-- Rigid Sigmoidoscopy -->
<form:present name="rc" property="RCP4RFSrigidperformed">
		<br/>
		Rigid Sigmoidoscopy - <form:equal name="rc" property="RCP4RFSrigidperformed" value="not performed">not performed</form:equal>
					<form:equal name="rc" property="RCP4RFSrigidperformed" value="performed">silent, </form:equal>
					<form:write name="rc" property="RCP4RFSrigidfindings"/>
		</form:present>
<!-- Rigid Sigmoidoscopy -->
<form:equal name="rc" property="RCP4RFSFSRectalBxtakenYN" value="yes"><br/>A rectal biopsy was taken.</form:equal>
<!-- Flexible Sigmoidoscopy -->
<form:present name="rc" property="RCP4RFSFSperformed">
		<br/>
		Flexible Sigmoidoscopy - <form:equal name="rc" property="RCP4RFSFSperformed" value="not performed">not performed</form:equal>
					<form:equal name="rc" property="RCP4RFSFSperformed" value="performed">silent, </form:equal>
					<form:write name="rc" property="RCP4RFSFSFind"/>
		</form:present>
<!-- Flexible Sigmoidoscopy -->
<form:equal name="rc" property="RCP4RFSFSBxtakenYN" value="yes"><br/>A biopsy was taken at flexible sigmoidoscopy.</form:equal>
<!-- Diagnosis -->
<form:present name="rc" property="RCP5DiagDiagnosis">
<br/>Diagnosis:
 <br/>
			 <ul>
			 <logic:iterate indexId="x" length="size" id="symptom" name="rc" property="value(RCP5DiagDiagnosis)">
						<li><c:out value="${symptom}"/></li>
			</logic:iterate>
				</ul>
</form:present>
<!-- Diagnosis -->
<!-- Investigations -->
<form:present name="rc" property="RCP5DiagInvestigation">
 <br/>
 Investigations:
 <br/>
			 <ul>
			 <logic:iterate indexId="x" length="size" id="symptom" name="rc" property="value(RCP5DiagInvestigation)">
						<li><c:out value="${symptom}"/></li>
			</logic:iterate>
				</ul>
</form:present>
<!-- Investigations -->
<!-- Management -->
<form:present name="rc" property="RCP5DiagInvestigation">
 <br/>
 Management:
 <br/>
			 <ul>
			 <logic:iterate indexId="x" length="size" id="symptom" name="rc" property="value(RCP5DiagInvestigation)">
						<li><c:out value="${symptom}"/></li>
			</logic:iterate>
				</ul>
</form:present>
<!-- Management -->
<!-- Advice -->
<form:present name="rc" property="RCP5DiagAdvice">
 <br/>
 Advice:
 <br/>
			 <ul>
			 <logic:iterate indexId="x" length="size" id="symptom" name="rc" property="value(RCP5DiagAdvice)">
						<li><c:out value="${symptom}"/></li>
			</logic:iterate>
				</ul>
</form:present>
<!-- Advice -->
<form:present name="rc" property="RCP5ManDrug1">
<br/>Treatment: <form:write name="rc" property="RCP5ManDrug1"/>, <form:write name="rc" property="RCP5ManDose1"/>, <form:write name="rc" property="RCP5ManDrug1Freq"/>
<form:present name="rc" property="RCP5ManDrug2"><form:write name="rc" property="RCP5ManDrug2"/>, <form:write name="rc" property="RCP5ManDose2"/>, <form:write name="rc" property="RCP5ManDrug2Freq"/>
</form:present>
</form:present>
<form:equal name="rc" property="RCP6S1OPDYN" value="no"><br/>No follow up has been arranged.</form:equal>
<form:equal name="rc" property="RCP6S1OPDYN" value="yes"><br/>A follow up has been made for <form:write name="rc" property="RCP6S1ConOpd"/> in 
<form:write name="rc" property="RCP6S1Conopddate"/>.</form:equal>
		<br/>
		<br/>
		Yours sincerely,
		<br/>
 		Dr Watt.
	  	<br/>
	 	<br/>
	 	____________________________________
 	</p>
</letter>