<%@ include file="/includes.jsp"%><%@ include file="styles.css"%>
<%@ taglib prefix="smvc" uri="http://www.springframework.org/tags/form"%>
<tiles:importAttribute />
<div class="container">
	<div class="sectionSubPageTop">
		<h2>Assessment Milestones</h2>
		<div class="fieldSet2Column" style="text-align: left;">
			<span class="inputLabel">Patient's baseline toxicity and
				performance status are recorded accurately.<br /> The patient
				toxicity assessment needs to be completed prior to each chemotherapy
				cycle.</span>
		</div>
		<div class="fieldSet2Column" style="text-align: left;">
			<p>This toxicity assessment form incorporates World Health
				Organisation Toxicity Assessment Criteria and the National Cancer
				Institute Common Terminology Criteria for Adverse Events Version 4.0
				Published: May 28, 2009 (v4.03: June 14, 2010).</p>
			<p>For further details of the grading system please refer to the
				guidance notes through following the link below.</p>
		</div>
		<div class="fieldSet2Column">
			<span class="inputLabel"><a
				href="http://intranet.spirehealthcare.net/Files/BPA%20Team/Guidance%20notes%20for%20patient%20toxicity%20assessment.pdf"
				target="_blank">Instructions for Toxicity Assessment <img
					src="../emdt/images/16x16/pdf.gif"
					title="Click to open instructions" alt="PDF" /> </a> </span>
		</div>
		<div class="fieldSet2Column">
			<hr />
		</div>
		<div class="fieldSetLeftColumn">
			<span class="inputLabel">Patient Treatment Stage:</span>
		</div>
		<div class="fieldSetRightColumn">
			<span class="inputControl"> <tiles:insertTemplate
					template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName"
						value="Chemo_Patient_Treatment_Stage" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="CF4P1PatStage" />
				</tiles:insertTemplate> </span>
		</div>

		<div class="fieldSet2Column"></div>

		<div class="fieldSetLeftColumn">
			<span class="inputLabel">Cycle nbr:</span>
		</div>
		<div class="fieldSetRightColumn">
			<span class="inputControl"> <tiles:insertTemplate
					template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_Cycle_Nbr" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="CF4P1PatCycle" />
				</tiles:insertTemplate> </span>
		</div>
		<div class="fieldSetLeftColumn">
			<span class="inputLabel">Day nbr:</span>
		</div>
		<div class="fieldSetRightColumn">
			<span class="inputControl"> <tiles:insertTemplate
					template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_Day_Nbr" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="CF4P1PatDay" />
				</tiles:insertTemplate> </span>
		</div>
	</div>



	<div class="sectionSubPageTop">
		<h2>Toxicity Assessment</h2>

		<table id="toxicity_table">
			<tr>
				<th>Toxicity</th>
				<th>Grade</th>
				<th>Comment</th>
			</tr>
		</table>

		<div class="tox_left_col"></div>
		<div class="tox_mid_col">
			<div class="ggyrr">
				<div class="gh">0</div>
				<div class="gh">1</div>
				<div class="gh">2</div>
				<div class="gh">3</div>
				<div class="gh">4</div>
			</div>
		</div>
		<div class="tox_right_col"></div>

		<div class="tox_left_col">
			<span class="tox_label">Performance status:</span>
		</div>
		<div class="tox_mid_col">
			<div class="ggyrr">
				<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="CF4P1PerfStat" />
				</tiles:insertTemplate>
			</div>
		</div>
		<div class="tox_right_col">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1CmtPerf" />
			</tiles:insertTemplate>
		</div>


		<div class="tox_left_col">
			<span class="tox_label">Nausea:</span>
		</div>
		<div class="tox_mid_col">
			<div class="ggyrr">
				<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="CF4P1Nausea" />
				</tiles:insertTemplate>
			</div>
		</div>
		<div class="tox_right_col">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1CmtNaus" />
			</tiles:insertTemplate>
		</div>

		<div class="tox_left_col">
			<span class="tox_label">Vomiting:</span>
		</div>
		<div class="tox_mid_col">
			<div class="ggyrr">
				<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="CF4P1Vomit" />
				</tiles:insertTemplate>
			</div>
		</div>
		<div class="tox_right_col">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1CmtVom" />
			</tiles:insertTemplate>
		</div>

		<div class="tox_left_col">
			<span class="tox_label">Mucositis / stomatitis:</span>
		</div>
		<div class="tox_mid_col">
			<div class="gyyrr">
				<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="CF4P1Muco" />
				</tiles:insertTemplate>
			</div>
		</div>
		<div class="tox_right_col">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1CmtMuco" />
			</tiles:insertTemplate>
		</div>

		<div class="tox_left_col">
			<span class="tox_label">Diarrhoea:</span>
		</div>
		<div class="tox_mid_col">
			<div class="gyyrr">
				<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="CF4P1Diar" />
				</tiles:insertTemplate>
			</div>
		</div>
		<div class="tox_right_col">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1CmtDiar" />
			</tiles:insertTemplate>
		</div>


		<div class="tox_left_col">
			<span class="tox_label">Constipation:</span>
		</div>
		<div class="tox_mid_col">
			<div class="ggyrr">
				<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="CF4P1Const" />
				</tiles:insertTemplate>
			</div>
		</div>
		<div class="tox_right_col">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1CmtCons" />
			</tiles:insertTemplate>
		</div>


		<div class="tox_left_col">
			<span class="tox_label">Fever/Pyrexia/Infection:</span>
		</div>
		<div class="tox_mid_col">
			<div class="grrrr">
				<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="multiValue(CF4P1Fever)" />
				</tiles:insertTemplate>
			</div>
		</div>
		<div class="tox_right_col">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1CmtFever" />
			</tiles:insertTemplate>
		</div>


		<div class="tox_left_col">
			<span class="tox_label">PPE:</span>
		</div>
		<div class="tox_mid_col">
			<div class="gyyrr">
				<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="multiValue(CF4P1PPE)" />
				</tiles:insertTemplate>
			</div>
		</div>
		<div class="tox_right_col">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1CmtPPE" />
			</tiles:insertTemplate>
		</div>



		<div class="tox_left_col">
			<span class="tox_label">Fatigue:</span>
		</div>
		<div class="tox_mid_col">
			<div class="ggyrr">
				<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="CF4P1Fatig" />
				</tiles:insertTemplate>
			</div>
		</div>
		<div class="tox_right_col">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1CmtFatig" />
			</tiles:insertTemplate>
		</div>



		<div class="tox_left_col">
			<span class="tox_label">Pain:</span>
		</div>
		<div class="tox_mid_col">
			<div class="ggyrr">
				<div class="grade g<c:out value="${pair.second}"/>" title="Grade ${pair.second}">
					<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
						<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
						<tiles:putAttribute name="fieldInputType" value="5" />
						<tiles:putAttribute name="fieldName" value="CF4P1Pain" />
					</tiles:insertTemplate>
				</div>
			</div>
		</div>
		<div class="tox_right_col">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1CmtPain" />
			</tiles:insertTemplate>
		</div>


		<div class="tox_left_col">
			<span class="tox_label">Anorexia:</span>
		</div>
		<div class="tox_mid_col">
			<div class="ggyrr">
				<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="CF4P1Anor" />
				</tiles:insertTemplate>
			</div>
		</div>
		<div class="tox_right_col">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1CmtAnor" />
			</tiles:insertTemplate>
		</div>


		<div class="tox_left_col">
			<span class="tox_label">Dyspnoea:</span>
		</div>
		<div class="tox_mid_col">
			<div class="ggyrr">
				<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="CF4P1Dyps" />
				</tiles:insertTemplate>
			</div>
		</div>
		<div class="tox_right_col">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1CmtDysp" />
			</tiles:insertTemplate>
		</div>



		<div class="tox_left_col">
			<span class="tox_label">Alopecia:</span>
		</div>
		<div class="tox_mid_col">
			<div class="ggyrr">
				<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
					<tiles:putAttribute name="fieldInputType" value="5" />
					<tiles:putAttribute name="fieldName" value="CF4P1Alop" />
				</tiles:insertTemplate>
			</div>
		</div>
		<div class="tox_right_col">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1CmtAlop" />
			</tiles:insertTemplate>
		</div>



	<div class="tox_left_col">
		<span class="tox_label">Rash:</span>
	</div>
	<div class="tox_mid_col">
		<div class="gyyrr">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
				<tiles:putAttribute name="fieldInputType" value="5" />
				<tiles:putAttribute name="fieldName" value="CF4P1Rash" />
			</tiles:insertTemplate>
		</div>
	</div>
	<div class="tox_right_col">
		<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
			<tiles:putAttribute name="fieldName" value="CF4P1CmtRash" />
		</tiles:insertTemplate>
	</div>



	<div class="tox_left_col">
		<span class="tox_label">Chest pain:</span>
	</div>
	<div class="tox_mid_col">
		<div class="grrrr">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
				<tiles:putAttribute name="fieldInputType" value="5" />
				<tiles:putAttribute name="fieldName" value="CF4P1Chest" />
			</tiles:insertTemplate>
		</div>
	</div>
	<div class="tox_right_col">
		<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
			<tiles:putAttribute name="fieldName" value="CF4P1CmtChest" />
		</tiles:insertTemplate>
	</div>


	<div class="tox_left_col">
		<span class="tox_label">Neuropathy:</span>
	</div>
	<div class="tox_mid_col">
		<div class="gyrrr">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
				<tiles:putAttribute name="fieldInputType" value="5" />
				<tiles:putAttribute name="fieldName" value="CF4P1Neuro" />
			</tiles:insertTemplate>
		</div>
	</div>
	<div class="tox_right_col">
		<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
			<tiles:putAttribute name="fieldName" value="CF4P1CmtNeur" />
		</tiles:insertTemplate>
	</div>



	<div class="tox_left_col">
		<span class="tox_label">Bleeding or bruising:</span>
	</div>
	<div class="tox_mid_col">
		<div class="grrrr">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
				<tiles:putAttribute name="fieldInputType" value="5" />
				<tiles:putAttribute name="fieldName" value="CF4P1Bleed" />
			</tiles:insertTemplate>
		</div>
	</div>
	<div class="tox_right_col">
		<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
			<tiles:putAttribute name="fieldName" value="CF4P1CmtBleed" />
		</tiles:insertTemplate>
	</div>


	<div class="tox_left_col">
		<span class="tox_label">Other:</span>
	</div>
	<div class="tox_mid_col">
		<div class="grrrr">
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldOptionsMapName" value="Chemo_ECOG_Status" />
				<tiles:putAttribute name="fieldInputType" value="5" />
				<tiles:putAttribute name="fieldName" value="CFP1Other" />
			</tiles:insertTemplate>
		</div>
	</div>
	<div class="tox_right_col">
		<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
			<tiles:putAttribute name="fieldName" value="CF4P1CmtOther" />
		</tiles:insertTemplate>
	</div>

	<div class="fieldSet2Column">
		Assessment Grading:
		<div id="assessmentGrading">
		<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
			<tiles:putAttribute name="fieldName" value="CF4P1AssessmentGrading" />
		</tiles:insertTemplate></div>
	</div>

</div>



<div class="sectionSubPageTop">
	<h2>Other Information</h2>
	<div class="fieldSetLeftColumn">
		<span class="inputLabel">Temperature (deg. C):</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> <tiles:insertTemplate
				template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1Temp" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSetLeftColumn">
		<span class="inputLabel">Pulse (bpm):</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> <tiles:insertTemplate
				template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1Pulse" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSetLeftColumn">
		<span class="inputLabel">Blood Pressure (mmHg):</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> <tiles:insertTemplate
				template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1BP" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSetLeftColumn">
		<span class="inputLabel">Oxygen Saturation (%):</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> <tiles:insertTemplate
				template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1SPO2" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSetLeftColumn">
		<span class="inputLabel">Respirations (per min):</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> <tiles:insertTemplate
				template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1RR" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSetLeftColumn">
		<span class="inputLabel">Weight (Kg):</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> <tiles:insertTemplate
				template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1Weight" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSet2Column">
		<div class="fieldSetLeftColumn">
			<span class="inputLabel">Other investigations:</span>
		</div>
		<div class="fieldSetRightColumn">
			<span class="inputControl"> <tiles:insertTemplate
					template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldName" value="CF4P1OtherInv" />
					<tiles:putAttribute name="colWidth" value="50" />
					<tiles:putAttribute name="colHeight" value="1" />
					<tiles:putAttribute name="fieldType" value="101" />
				</tiles:insertTemplate> </span>
		</div>
	</div>

	<div class="fieldSet2Column">
		<hr />
	</div>


	<div class="fieldSetLeftColumn">
		<span class="inputLabel">Has the patient been admitted to
			hospital or been seen by a GP since treatment was prescribed?</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> <webapp:namedList id="nl_YesNo"
				domain="EMDT" name="YesNo" /><c:forEach var="pair" items="${nl_YesNo.pairIterator}" varStatus="radioCount">
				<smvc:radiobutton disabled="${readOnly}" path="multiValue[CF4P1PatAdm]" value="${pair.first}"
					id="CF4P1PatAdm${radioCount.count}"/> <c:out value="${pair.second}"/>&nbsp;	 
			</c:forEach> 
			<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldOptionsMapName"
					value="Chemo_Patient_Treatment_Stage" />
				<tiles:putAttribute name="fieldInputType" value="5" />
				<tiles:putAttribute name="fieldName" value="CF4P1PatAdm" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSet2Column">
		<div class="fieldSetLeftColumn">
			<span class="inputLabel">Reason:</span>
		</div>
		<div class="fieldSetRightColumn">
			<span class="inputControl"> <tiles:insertTemplate
					template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldName" value="CF4P1PatAdmReas" />
					<tiles:putAttribute name="colWidth" value="50" />
					<tiles:putAttribute name="colHeight" value="1" />
					<tiles:putAttribute name="fieldType" value="101" />
				</tiles:insertTemplate> </span>

		</div>
	</div>
	<div class="fieldSet2Column"></div>

	<div class="fieldSet2Column">
		<hr />
	</div>

	<div class="fieldSet2Column">
		<span class="inputLabel"><u>Blood Count Results</u> </span>
	</div>
	<div class="fieldSetLeftColumn">
		<span class="inputLabel">Date blood taken:</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> <tiles:insertTemplate
				template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1BldDt" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSetLeftColumn">
		<span class="inputLabel">Haemoglobin (gm/dL):</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> <tiles:insertTemplate
				template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1Hb" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSetLeftColumn">
		<span class="inputLabel">White Blood Cell count (per mcL):</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> <tiles:insertTemplate
				template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1WBC" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSetLeftColumn">
		<span class="inputLabel">Neutrophil count:</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> <tiles:insertTemplate
				template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1Neut" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSetLeftColumn">
		<span class="inputLabel">Platelet count:</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> <tiles:insertTemplate
				template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1Plat" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSet2Column">
		<div class="fieldSetLeftColumn">
			<span class="inputLabel">Abnormal biochemistry:</span>
		</div>
		<div class="fieldSetRightColumn">
			<span class="inputControl"> <tiles:insertTemplate
					template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldName" value="CF4P1AbChem" />
					<tiles:putAttribute name="colWidth" value="50" />
					<tiles:putAttribute name="colHeight" value="1" />
					<tiles:putAttribute name="fieldType" value="101" />
				</tiles:insertTemplate> </span>
		</div>
	</div>
	<div class="fieldSetLeftColumn">
		<span class="inputLabel">Estimated Glomerular Filtration Rate:</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> <tiles:insertTemplate
				template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldName" value="CF4P1GFR" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSetLeftColumn">
		<span class="inputLabelAbove">Relevant tumour marker taken:</span>
	</div>
	<div class="fieldSetRightColumn">
		<span class="inputControl"> 
				<c:forEach var="pair" items="${nl_YesNo.pairIterator}" varStatus="radioCount">
				<smvc:radiobutton disabled="${readOnly}" path="multiValue[CF4P1RelTumMk]" value="${pair.first}"
					id="CF4P1RelTumMk${radioCount.count}"/> <c:out value="${pair.second}"/>&nbsp;	 
			</c:forEach> <tiles:insertTemplate template='../../printFieldRenderer.jsp'>
				<tiles:putAttribute name="fieldOptionsMapName"
					value="Chemo_Patient_Treatment_Stage" />
				<tiles:putAttribute name="fieldInputType" value="5" />
				<tiles:putAttribute name="fieldName" value="CF4P1PatStage" />
			</tiles:insertTemplate> </span>
	</div>
	<div class="fieldSet2Column">
		<div class="fieldSetLeftColumn">
			<span class="inputLabel">Detail:</span>
		</div>
		<div class="fieldSetLeftColumn">
			<span class="inputControl"> <tiles:insertTemplate
					template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldName" value="CF4P1RelTumDtl" />
					<tiles:putAttribute name="colWidth" value="50" />
					<tiles:putAttribute name="colHeight" value="1" />
					<tiles:putAttribute name="fieldType" value="101" />
				</tiles:insertTemplate> </span>
		</div>
	</div>
	<div class="fieldSet2Column">
		<div class="fieldSetLeftColumn">
			<span class="inputLabel">Allergies:</span>
		</div>
		<div class="fieldSetLeftColumn">
			<span class="inputControl">
				<tiles:insertTemplate template='../../printFieldRenderer.jsp'>
					<tiles:putAttribute name="fieldName" value="CF4P1Allergy" />
					<tiles:putAttribute name="colWidth" value="50" />
					<tiles:putAttribute name="colHeight" value="1" />
					<tiles:putAttribute name="fieldType" value="101" />
				</tiles:insertTemplate> </span>
		</div>
	</div>
</div>
</div>

<script type="text/javascript">
//  	CF4P1AssessmentGrading
//		CF4P1TempWarning
//		CF4P1SPO2Warning

/*
Assessment Grading: Calculated as follows
Red [Must be seen and reviewed by senior medical staff prior to treatment] = Patients flagging up 2x Ambers (or more) equates to a RED. As does any red outcome.
Amber [Review by senior nurse / medical staff]= 1x Amber AND / OR Patient has been seen by GP / admitted to hospital (Yes)
Green [Proceed with treatment] = All green AND No to Patient has been seen by GP

Custom Warning Messages: 
Temp: IF >= 37.7 THEN Warning = "Patient is pyrexial and at risk with possible infection. Discuss with senior nurse or medical staff."
SPO2: IF =< 90 THEN Warning = "Possible hypoxia. Discuss with senior nurse or medical staff.

 */

 function checkAndSetTempWarning ()	{
	 var tempstr = $('#CF4P1Temp').val();
	 var temp = 0.0;
	 var warningTemp = 37.7;
	 var warningMessage = "Patient is pyrexial and at risk with possible infection. Discuss with senior nurse or medical staff.";
	 if (tempstr != '' &&  ( ! isNaN(tempstr)) )	{
		 temp = tempstr;
	 }
	 if (temp >= warningTemp)	{
		 $('#tempWarning').text(warningMessage);
	 }
	 else	{
		 $('#tempWarning').text('');
	 }
 }
 
 $('#CF4P1Temp').change (function ()	{
	 checkAndSetTempWarning();
 });

 function checkAndSetOxygenWarning ()	{
	 var oxystr = $('#CF4P1SPO2').val();
	 var oxy = 999; // sentinel value
	 var warningOxy = 90;
	 var warningMessage = "Possible hypoxia. Discuss with senior nurse or medical staff.";
	 if (oxystr != '' &&  ( ! isNaN(oxystr)) )	{
		 oxy = oxystr;
	 }
	 if (oxy <= warningOxy)	{
		 $('#spo2Warning').text(warningMessage);
	 }
	 else	{
		 $('#spo2Warning').text('');
	 }
 }
 
 $('#CF4P1SPO2').change (function ()	{
	 checkAndSetOxygenWarning();
 });
 

 // Names of radio buttons which are coloured in sequence 0=green, 1=green, 2=yellow, 3=red, 4=red etc
var ggyrr_field_names = ["CF4P1PerfStat", "CF4P1Nausea", "CF4P1Vomit", "CF4P1Const", "CF4P1Fatig", "CF4P1Pain", "CF4P1Anor", "CF4P1Dyps", "CF4P1Alop"];
var gyyrr_field_names = ["CF4P1Muco", "CF4P1Diar", "CF4P1PPE", "CF4P1Rash"];
var grrrr_field_names = ["CF4P1Fever", "CF4P1Chest", "CF4P1Bleed", "CFP1Other"];
var gyrrr_field_names = ["CF4P1Neuro"];

// Determine colour of a radio button from its name and numeric value
//   returns: colour name as string, e.g. 'red', 'green', 'amber', or 'unknown' as an error case.
//
function get_colour (name, value)	{
	
	// do the easy short cuts first, since all 0 is green and all 3 or 4 is red
	if (value == 0)
		return 'green';
	
	if (value == 3 || value == 4)
		return 'red';

	// all radios in this sequence are red apart from value 0
	for (i = 0; i < grrrr_field_names.length; i++)	{
		if (name.indexOf(grrrr_field_names[i]) != -1)	{
			return 'red';
		}
	}

	// we just have values 1 and 2 to distinguish now
	if (name.indexOf('CF4P1Neuro') != -1)	{
		if (value == 2)		{
			return 'red';
		}
		return 'amber';
	}
		
	if (value == 2)		{
		return 'amber';
	}
	
	// only 1 to distinguish now

	for (i = 0; i < ggyrr_field_names.length; i++)	{
		if (name.indexOf(ggyrr_field_names[i]) != -1)	
			return 'green';
	}
	for (i = 0; i < gyyrr_field_names.length; i++)	{
		if (name.indexOf(gyyrr_field_names[i]) != -1)	
		return 'amber';
	}
	
	return 'unknown';
}

var numred = '';
var numamber = '';
var numgreen = '';

// calculate assessment grading when any of the toxicity radios are clicked
$('.grade > input:radio').click( function() {
	setAssessmentGrading();
});
// calculate assessment grading when the 'patient admitted to hospital or seen gp' radio is clicked
$('#CF4P1PatAdm0').click( function()	{
	setAssessmentGrading();
});
$('#CF4P1PatAdm1').click( function()	{
	setAssessmentGrading();
});

// calculate assessment grading when page initially loads
$( document ).ready(function() {
	setAssessmentGrading();
	 checkAndSetTempWarning();
	 checkAndSetOxygenWarning ();
});
//
// Calculate and dislay the assessment grading.
// Based on number of colours selected and state of 'patient admitted to hospital' radio button, determine appropriate warning message and display it in a DIV and a hidden field.
//
function setAssessmentGrading ()	{	
	var colour = '';
	numred = 0;
	numgreen = 0;
	numamber = 0;
	
	$('.grade > input[type=radio]:checked').each(function ()	{
			colour = get_colour(this.name, this.value);
			if (colour == 'red')
				numred++;
			if (colour == 'green')
				numgreen++;
			if (colour == 'amber')
				numamber++;
	});

	if (numred > 0 || numamber >= 2)	{
		// red alert
		$('#CF4P1AssessmentGrading').val('Red: Must be seen and reviewed by senior medical staff prior to treatment');
		$('#assessmentGrading').text('Red: Must be seen and reviewed by senior medical staff prior to treatment');
		$('#assessmentGrading').css('color', 'red');
	}
	else if (numamber == 1 || $('#CF4P1PatAdm0').prop("checked") == true) 	{
		$('#CF4P1AssessmentGrading').val( 'Amber: Review by senior nurse / medical staff');
		$('#assessmentGrading').text( 'Amber: Review by senior nurse / medical staff');
		$('#assessmentGrading').css('color', 'orange');
	}
	else if (numamber == 0 && numred == 0 && $('#CF4P1PatAdm0').prop("checked") != true && numgreen > 0)	{
		$('#CF4P1AssessmentGrading').val ( 'Green: Proceed with treatment' );
		$('#assessmentGrading').text ( 'Green: Proceed with treatment' );
		$('#assessmentGrading').css('color', 'green');
	}
}
 
</script>