<%@ include file="/includes.jsp"%>
<%@ taglib prefix="smvc" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ include file="styles.css"%>

<tiles:importAttribute />
<c:set var="readOnly" value="false"/>
<c:if test="${consultationNoteForm.view.note.locked eq true}">
	<c:set var="readOnly" value="true"/>
</c:if>
<webapp:namedListByFormDefinition formDefinition="${consultationNoteForm.view.form}" id="namedListMap" filterName="${requestScope.ATT_FilterdCode}" filterHospCode="${emdt.currentUser.hospital.hospitalCode}"/>
<c:set var="namedListMap" value="${namedListMap}" scope="request"/>

<div class="container">

	<input type="hidden" value="false" id="unsaveButtonId" />


	<div class="sectionSubPageTop">

		<h2>Staging</h2>


		<div class="fieldSetLeftColumn">
			<span class="inputLabel"><b>Right:</b> </span>
		</div>
		
		<div class="fieldSetRightColumn">
			<span class="inputControl">
				T: <webapp:namedListSpring disabled="${readOnly}" path='value[StagingRightT]' id="StagingRightT" domain="EMDT" name="TValues" nlFromFormDefinition="${namedListMap['EMDT']['TValues']}"/>
					&nbsp;&nbsp;&nbsp;
				N: <webapp:namedListSpring disabled="${readOnly}" path='value[StagingRightN]' id="StagingRightN" domain="EMDT" name="NValues" nlFromFormDefinition="${namedListMap['EMDT']['NValues']}" />
					&nbsp;&nbsp;&nbsp;
				M: <webapp:namedListSpring disabled="${readOnly}" path='value[StagingRightM]' id="StagingRightM" domain="EMDT" name="MValues" nlFromFormDefinition="${namedListMap['EMDT']['MValues']}" />
			</span>
		</div>
		
		
		
		<div class="fieldSetLeftColumn">
			<span class="inputLabel"><b>Left:</b> </span>
		</div>
		<div class="fieldSetRightColumn">
			<span class="inputControl">
			T: <webapp:namedListSpring disabled="${readOnly}" path='value[StagingLeftT]' id="StagingLeftT" domain="EMDT" name="TValues"  nlFromFormDefinition="${namedListMap['EMDT']['TValues']}" />
				&nbsp;&nbsp;&nbsp;
			N: <webapp:namedListSpring disabled="${readOnly}" path='value[StagingLeftN]' id="StagingLeftN" domain="EMDT" name="NValues"  nlFromFormDefinition="${namedListMap['EMDT']['NValues']}" />
				&nbsp;&nbsp;&nbsp;
			M: <webapp:namedListSpring disabled="${readOnly}" path='value[StagingLeftM]' id="StagingLeftM" domain="EMDT" name="MValues"  nlFromFormDefinition="${namedListMap['EMDT']['MValues']}" />
			</span>
		</div>

		
		<div class="fieldSet2Column">
			<span class="inputLabelAbove">Proposed Management</span>
		</div>
		<div class="fieldSet2Column">
			<span class="inputControlWide"><smvc:textarea readonly="${readOnly}" path="value[ProposedManagement]" cols="100" rows="3" id="ProposedManagement" /></span>
		</div>
		
	</div>
		
		
		
		
	<div class="sectionSubPageTop">

		<h2>Surgery</h2>
	
		<div class="fieldSet2Column">
			<span class="inputLabelAbove">Planned Surgery (including reason for Mastectomy if applicable)</span>
		</div>
		<div class="fieldSet2Column">
			<span class="inputControlWide"><smvc:textarea readonly="${readOnly}" path="value[PlannedSurgery]" cols="100" rows="3" id="PlannedSurgery" /></span>
		</div>	

		<div class="fieldSetLeftColumn">
			<span class="inputLabelAbove">Date of Surgery</span>
		</div>
		<div class="fieldSetRightColumn">
			<span class="inputControl">
			<spring:bind path='value[DateOfSurgery]'>
				<c:choose>
					<c:when test="${disabled or readOnly}">
					<input type="text" name="value[DateOfSurgery]" size="0" id="DateOfSurgery" class="form-control" readonly="readonly" value="<c:out value="${consultationNoteForm.view.note.values[  'DateOfSurgery']}"/>" disabled="disabled" placeholder="dd/mm/yyyy"/>
				</c:when>
				<c:otherwise>
					<input type="text" name="value[DateOfSurgery]" size="0" id="DateOfSurgery" class="form-control" value="<c:out value="${consultationNoteForm.view.note.values[  'DateOfSurgery']}"/>" placeholder="dd/mm/yyyy"/>
				</c:otherwise>
			</c:choose>
			</spring:bind>
			&nbsp;<img title='Click to choose date' style='cursor: pointer' src='../images/16x16/date.png' id='DateOfSurgery_DateTrigger' /></span>
		</div>
		
	</div>

		
		<div class="sectionSubPageTop">


		<h2>Histopathology</h2>

		<table width="100%">
			<tr>
				<td width="50%">
					<table width="100%">
						<tr>
							<td><span class="inputLabel">Size (mm)</span> </td> <td><span class="inputControl"><smvc:input readonly="${readOnly}" path="value[Size]" size="5" id="Size" /></span> </td>
						</tr>				
						<tr>
							<td> <span class="inputLabel">Size (invasive + DCIS) mm</span></td> <td><span class="inputControl"><smvc:input readonly="${readOnly}" path="value[SizeInvasiveDCIS]" size="5" id="SizeInvasiveDCIS" /></span> </td>
						</tr>				
						<tr>
							<td><span class="inputLabel">Tumour Type</span> </td> <td><span class="inputControl"><smvc:input readonly="${readOnly}" path="value[TumourType]" size="20" id="TumourType" /></span> </td>
						</tr>		
						
						<tr>
							<td><span class="inputLabel">Grade</span> </td>
							<td><span class="inputControl">
								<c:set var="tempOptionsMapDomain" value="EMDT"/>
								<c:set var="tempOptionsMapName" value="List1to3"/>
								<webapp:namedList id="nl" domain="${tempOptionsMapDomain }" name="${tempOptionsMapName}" nlFromFormDefinition="${namedListMap[tempOptionsMapDomain][tempOptionsMapName]}"/>
								<c:forEach var="pair" items="${nl.pairIterator}" varStatus="radioCount">
									<smvc:radiobutton disabled="${readOnly}" path='multiValue[Grade]' value="${pair.first}" id="Grade${radioCount.count}" />&nbsp;<c:out value="${pair.second}"/>&nbsp;
								</c:forEach>
								</span> 
							</td>
						</tr>		
						<tr>
							<td> <span class="inputLabel">LVI</span></td> <td><span class="inputControl"><smvc:input readonly="${readOnly}" path="value[LVI]" size="20" id="LVI" /></span>
							</td>
						</tr>		
						<tr>
							<td> <span class="inputLabel">Margins</span></td> <td><span class="inputControl"><smvc:input readonly="${readOnly}" path="value[Margins]" size="20" id="Margins" /></span> </td>
						</tr>		
					</table>
					
				 </td>	
				<td width="50%">
				
					<table width="100%">
						<tr>
							<td><span class="inputLabel">NPI</span> </td> <td><span class="inputControl"><smvc:input readonly="${readOnly}" path="value[NPI]" size="30" id="NPI" /></span> </td>
						</tr>
						<tr>
							<td><span class="inputLabel">Nodes</span> </td> <td><span class="inputControl"><smvc:input readonly="${readOnly}" path="value[Nodes]" size="30" id="Nodes" /></span> </td>
						</tr>
						<tr>
							<td><span class="inputLabel">DCIS</span> </td> <td><span class="inputControl"><smvc:input readonly="${readOnly}" path="value[DCIS]" size="30" id="DCIS" /></span> </td>
						</tr>
						<tr>
							<td><span class="inputLabel">ER</span> </td> <td><span class="inputControl"><smvc:input readonly="${readOnly}" path="value[ER]" size="30" id="ER" /></span> </td>
						</tr>
						<tr>
							<td><span class="inputLabel">PR</span> </td> <td><span class="inputControl"><smvc:input readonly="${readOnly}" path="value[PR]" size="30" id="PR" /></span> </td>
						</tr>
						<tr>
							<td><span class="inputLabel">Her2</span> </td> <td><span class="inputControl"><smvc:input readonly="${readOnly}" path="value[HER2]" size="30" id="HER2" /></span> </td>
						</tr>
					</table>
				
				 </td>
			</tr>
		</table>
	</div>

	
	
	<div class="sectionSubPageTop">

		<h2>Oncology </h2>

		<div class="fieldSetLeftColumn">
			<span class="inputLabel">Consultant Oncologist</span>
		</div>
		<div class="fieldSetRightColumn">
			<span class="inputControl">
				<webapp:namedListSpring disabled="${readOnly}" path='value[ConsultantOncologist]' id="ConsultantOncologist" domain="EMDT" name="SpireEdOnc"  nlFromFormDefinition="${namedListMap['EMDT']['SpireEdOnc']}" />
			</span>
		</div>
	
		<div class="fieldSetLeftColumn">
			<span class="inputLabel">Treatment Intention</span>
		</div>
		<div class="fieldSetRightColumn">
			<span class="inputControl">
				<webapp:namedListSpring disabled="${readOnly}" path='value[TreatmentIntention]' id="TreatmentIntention" domain="EMDT" name="Treatmentintention"  nlFromFormDefinition="${namedListMap['EMDT']['Treatmentintention']}" />
			</span>
		</div>

		<div class="fieldSetLeftColumn">
			<span class="inputLabel">Palliative care referral</span>
		</div>

		<div class="fieldSetRightColumn">
			<span class="inputControl">
				<c:set var="tempOptionsMapDomain" value="EMDT"/>
				<c:set var="tempOptionsMapName" value="YesNo"/>
				<webapp:namedList id="nl" domain="${tempOptionsMapDomain }" name="${tempOptionsMapName}" nlFromFormDefinition="${namedListMap[tempOptionsMapDomain][tempOptionsMapName]}"/>
				<c:forEach var="pair" items="${nl.pairIterator}" varStatus="radioCount">
					<smvc:radiobutton disabled="${readOnly}" path='multiValue[PalliativeCare]' value="${pair.first}" id="PalliativeCare${radioCount.count}" />&nbsp;<c:out value="${pair.second}"/>&nbsp;
					<%-- can put a <br/> here to make list vertical --%>
				</c:forEach></span>
		</div>
	


		<div class="fieldSet2Column">
		<h3>Planned Treatment</h3>
		
		<table width="100%" id="plannedTreatmentTable">
			<tr>
				<td><span class="inputLabel">Chemotherapy</span></td>
				<td><span class="inputControl">  
						<c:set var="tempOptionsMapDomain" value="EMDT"/>
						<c:set var="tempOptionsMapName" value="YesNo"/>
						<webapp:namedList id="nl" domain="${tempOptionsMapDomain }" name="${tempOptionsMapName}" nlFromFormDefinition="${namedListMap[tempOptionsMapDomain][tempOptionsMapName]}"/>
						<c:forEach var="pair" items="${nl.pairIterator}" varStatus="radioCount">
							<smvc:radiobutton disabled="${readOnly}" path='multiValue[Chemotherapy]' value="${pair.first}" id="Chemotherapy${radioCount.count}" />&nbsp;<c:out value="${pair.second}"/>&nbsp;
							<%-- can put a <br/> here to make list vertical --%>
						</c:forEach></span>
				</td>
				<td width="65%">
					<span class="inputLabel" style="float: left;">Cycles</span> <span class="inputControl"><smvc:input readonly="${readOnly}" path="value[Cycles]" size="40" id="Cycles" /></span>
					<span class="inputLabel" style="float: left;">Frequency</span> <span class="inputControl"><smvc:input readonly="${readOnly}" path="value[Frequency]" size="40" id="Frequency" /></span>
				</td>
			</tr>

			<tr>
				<td style="padding-bottom: 5px;"><span class="inputLabel">Radiotherapy</span></td>
				<td style="padding-bottom: 5px;"><span class="inputControl"> 
						<c:set var="tempOptionsMapDomain" value="EMDT"/>
						<c:set var="tempOptionsMapName" value="YesNo"/>
						<webapp:namedList id="nl" domain="${tempOptionsMapDomain }" name="${tempOptionsMapName}" nlFromFormDefinition="${namedListMap[tempOptionsMapDomain][tempOptionsMapName]}"/>
						<c:forEach var="pair" items="${nl.pairIterator}" varStatus="radioCount">
							<smvc:radiobutton disabled="${readOnly}" path='multiValue[RadioTherapy]' value="${pair.first}" id="RadioTherapy${radioCount.count}" />&nbsp;<c:out value="${pair.second}"/>&nbsp;
							<%-- can put a <br/> here to make list vertical --%>
						</c:forEach>
				</span></td>
				<td style="padding-bottom: 5px;"><span class="inputLabel" style="float: left;">Fractions</span> <span class="inputControl"><smvc:input readonly="${readOnly}" path="value[Fractions]" size="40" id="Fractions" /></span>
				</td>
			</tr>
			
			<tr>
				<td align="right"><span class="inputLabel" style="float: right;">Radiotherapy site:</span></td>
				<td colspan="2" align="right">
					<span class="inputControl"> 
						<c:set var="tempOptionsMapDomain" value="EMDT"/>
						<c:set var="tempOptionsMapName" value="TAF_Active_Tmnt"/>
						<webapp:namedList id="nl" domain="${tempOptionsMapDomain }" name="${tempOptionsMapName}" nlFromFormDefinition="${namedListMap[tempOptionsMapDomain][tempOptionsMapName]}"/>
						<c:forEach var="pair" items="${nl.pairIterator}"  varStatus="checkboxCount">
						<smvc:checkbox disabled="${readOnly}" path='multiValue[RadioTherapySite]' value="${pair.first}" id="RadioTherapySite${checkboxCount.count}" />&nbsp;<c:out value="${pair.second}"/>&nbsp;
						<%-- can put a <br/> here to make list vertical --%>
					</c:forEach>
					</span>
					<span class="inputControl"><smvc:input readonly="${readOnly}" path="value[OtherRadiotherapySite]" size="40" id="OtherRadiotherapySite" /></span>
				</td>
			</tr>

			<tr>
				<td><span class="inputLabel">Hormone Therapy</span></td>
				<td><span class="inputControl">
					<c:set var="tempOptionsMapDomain" value="EMDT"/>
					<c:set var="tempOptionsMapName" value="YesNo"/>
					<webapp:namedList id="nl" domain="${tempOptionsMapDomain }" name="${tempOptionsMapName}" nlFromFormDefinition="${namedListMap[tempOptionsMapDomain][tempOptionsMapName]}"/>
					<c:forEach var="pair" items="${nl.pairIterator}" varStatus="radioCount">
						<smvc:radiobutton disabled="${readOnly}" path='multiValue[HormoneTherapy]' value="${pair.first}" id="HormoneTherapy${radioCount.count}" />&nbsp;<c:out value="${pair.second}"/>&nbsp;
					<%-- can put a <br/> here to make list vertical --%>
					</c:forEach>
					</span>
				</td>
				<td><span class="inputLabel" style="float: left;">Hormone Therapy notes</span> <span class="inputControl"><smvc:input readonly="${readOnly}" path="value[HormoneTherapyNotes]" size="40" id="HormoneTherapyNotes" /></span></td>
			</tr>
			<tr>
				<td><span class="inputLabel">Monoclonal Antibody</span></td>
				<td><span class="inputControl">
					<c:set var="tempOptionsMapDomain" value="EMDT"/>
					<c:set var="tempOptionsMapName" value="YesNo"/>
					<webapp:namedList id="nl" domain="${tempOptionsMapDomain }" name="${tempOptionsMapName}" nlFromFormDefinition="${namedListMap[tempOptionsMapDomain][tempOptionsMapName]}"/>
					<c:forEach var="pair" items="${nl.pairIterator}" varStatus="radioCount">
							<smvc:radiobutton disabled="${readOnly}" path='multiValue[MonoClonal]' value="${pair.first}" id="MonoClonal${radioCount.count}" />&nbsp;<c:out value="${pair.second}"/>&nbsp;
							<%-- can put a <br/> here to make list vertical --%>
					</c:forEach>
				</span>
				</td>
				<td><span class="inputLabel" style="float: left;">Monoclonal Antibody notes</span> <span class="inputControl"><smvc:input readonly="${readOnly}" path="value[MonoclonalNotes]" size="40" id="PMonoclonalNotes" /></span></td>
			</tr>
			<tr>
				<td><span class="inputLabel">Oncotype DS</span></td>
				<td><span class="inputControl">
					<c:set var="tempOptionsMapDomain" value="EMDT"/>
					<c:set var="tempOptionsMapName" value="YesNo"/>
					<webapp:namedList id="nl" domain="${tempOptionsMapDomain }" name="${tempOptionsMapName}" nlFromFormDefinition="${namedListMap[tempOptionsMapDomain][tempOptionsMapName]}"/>
					<c:forEach var="pair" items="${nl.pairIterator}" varStatus="radioCount">
							<smvc:radiobutton disabled="${readOnly}" path='multiValue[OncotypeDS]' value="${pair.first}" id="OncotypeDS${radioCount.count}" />&nbsp;<c:out value="${pair.second}"/>"/>&nbsp;
							<%-- can put a <br/> here to make list vertical --%>
						</c:forEach>
				</span>
				</td>
				<td><!-- nothing currently in this column --></td>
			</tr>
			<tr>
				<td><span class="inputLabel" style="float: left;">Herceptin</span> 
				</td>
				<td> <span class="inputControl">
					<c:set var="tempOptionsMapDomain" value="EMDT"/>
					<c:set var="tempOptionsMapName" value="YesNo"/>
					<webapp:namedList id="nl" domain="${tempOptionsMapDomain }" name="${tempOptionsMapName}" nlFromFormDefinition="${namedListMap[tempOptionsMapDomain][tempOptionsMapName]}"/>
					<c:forEach var="pair" items="${nl.pairIterator}" varStatus="radioCount">
							<smvc:radiobutton disabled="${readOnly}" path='multiValue[Herceptin]' value="${pair.first}" id="Herceptin${radioCount.count}" />&nbsp;<c:out value="${pair.second}"/>&nbsp;
							<%-- can put a <br/> here to make list vertical --%>
						</c:forEach>

				</span></td>
				<td><!-- nothing here! --></td>
			</tr>
		</table>
		</div>
		
		<div class="fieldSet2Column">
			<span class="inputLabelAbove">Planned Treatment</span>
		</div>
		<div class="fieldSet2Column">
			<span class="inputControlWide"><smvc:textarea readonly="${readOnly}" path="value[PlannedTreatment]" cols="100" rows="3" id="PlannedTreatment" /></span>
		</div>

		<div class="fieldSet2Column">
			<span class="inputLabelAbove">Reason For Any Treatment Outside Licence Indication</span>
		</div>
		<div class="fieldSet2Column">
			<span class="inputControlWide"><smvc:textarea readonly="${readOnly}" path="value[ReasonforTrtwo]" cols="100" rows="3" id="ReasonforTrtwo" /></span>
		</div>
	</div>

		
	
	
	
	<div class="sectionSubPageTop">

		<h2>General </h2>

		<div class="fieldSet2Column">
			<span class="inputLabelAbove">Future Appointments</span>
		</div>
		<div class="fieldSet2Column">
			<span class="inputControlWide"><smvc:textarea readonly="${readOnly}" path="value[FutureAppointments]" cols="100" rows="3" id="FutureAppointments" /></span>
		</div>
	
		<div class="fieldSet2Column">
			<span class="inputLabelAbove">Further Comments / Notes</span>
		</div>
		<div class="fieldSet2Column">
			<span class="inputControlWide"><smvc:textarea readonly="${readOnly}" path="value[FurtherCommentsNotes]" cols="100" rows="3" id="FurtherCommentsNotes" /></span>
		</div>
		
		<div class="fieldSet2Column">
			<span class="inputLabelAbove">Attached Files</span>
		</div>
		<div class="fieldSet2Column">
			<tiles:insertTemplate template="/emdt/tiles/fileContent.jsp">
			<tiles:putAttribute name="fieldName" value="AttachedFiles" />
			<tiles:putAttribute name="fieldWidth" value="0" />
			<tiles:putAttribute name="parentPage" value="standard" />
			<tiles:putAttribute name="disabled" value="${readOnly}"/>
			</tiles:insertTemplate>
		</div>
		
		<div class="fieldSet2Column">
			<span class="inputLabel">Signature</span>
		</div>
		<div class="fieldSet2Column">
			<span class="inputControl">
				<webapp:namedListSpring disabled="${readOnly}" path='value[Signature]' id="Signature" domain="EMDT" name="SpireEdSurgOnc Ellie"   nlFromFormDefinition="${namedListMap['EMDT']['SpireEdSurgOnc Ellie']}" />
			 </span>
		</div>

	</div>
	
</div>

<br/>