<%@ 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>Re-Staging</h2>

		<table width="100%">
			<tr>
				<td width="50%">

					<div class="fieldSetLeftColumn">
						<span class="inputLabel">Presented by</span>
					</div>
					<div class="fieldSetRightColumn">
						<span class="inputControl">
								<webapp:namedListSpring disabled="${readOnly}" path='value[PresentedBy]' id="PresentedBy" domain="EMDT" name="SpireEdSurg Onc"  nlFromFormDefinition="${namedListMap['EMDT']['SpireEdSurg Onc']}"/>
							</span>
					</div>
				</td>
				<td></td>
			</tr>
		</table>


		<h2>Original Disease</h2>


			<table width="100%">
				<tr>
					<td width="50%">
					
						<div class="fieldSetLeftColumn">
							<span class="inputLabel">Original Disease</span>
						</div>
						<div class="fieldSetRightColumn">
							<span class="inputControl"><smvc:input  readonly="${readOnly}" path="value[OriginalDisease]" size="30" id="OriginalDisease" /></span>
						</div>
					
						<div class="fieldSet2Column">
							<span class="inputLabel">SIDE</span>
			
							<span class="inputControl">
								<c:set var="tempOptionsMapDomain" value="EMDT"/>
								<c:set var="tempOptionsMapName" value="LeftorRight"/>
								<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[RstgSide]' value="${pair.first}" id="RstgSide${checkboxCount.count}" />&nbsp;<c:out value="${pair.second}"/>&nbsp;
								<%-- can put a <br/> here to make list vertical --%>
								</c:forEach>		
							</span>
						</div>
							
						<div class="fieldSet2Column">
							<span class="inputLabelAbove">Tumour Type</span>
						</div>
						
						<div class="fieldSet2Column">			
							<span class="inputControl"> <smvc:textarea readonly="${readOnly}" path="value[TumourType]" cols="30" rows="3" id="TumourType" /></span>
						</div>

						<div class="fieldSet2Column">
							<span class="inputLabelAbove">Nodes</span>
						</div>
						
						<div class="fieldSet2Column">			
							<span class="inputControl"> <smvc:textarea readonly="${readOnly}" path="value[Nodes]" cols="30" rows="3" id="Nodes" /></span>
						</div>


						<div class="fieldSetLeftColumn">
							<span class="inputLabel">Grade</span>
						</div>
						<div class="fieldSetRightColumn">
			
							<span class="inputControl">
								<c:set var="tempOptionsMapDomain" value="EMDT"/>
								<c:set var="tempOptionsMapName" value="Grade"/>
								<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>
						</div>
						
						<div class="fieldSet2Column">
						<table width="100%">
							<tr>
								<td><span class="inputLabel">ER</span>
								</td>
								<td><span class="inputControl"><smvc:input  readonly="${readOnly}" path="value[ER]" size="20" 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="20" 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="20" id="HER2" /></span>
								</td>
							</tr>
						</table>
						</div>
			
					</td>
					
					<td width="50%">
					
						<div class="fieldSetLeftColumn">
							<span class="inputLabel">Surgery</span>
						</div>
						<div class="fieldSetRightColumn">
							<span class="inputControl"><smvc:input  readonly="${readOnly}" path="value[Surgery]" size="20" id="Surgery" /></span>
						</div>
						
						<div class="fieldSetLeftColumn">
							<span class="inputLabel">Date of Surgery</span>
						</div>
						<div class="fieldSetRightColumn">
							<span class="inputControl">
							<spring:bind path='value[Date]'>
								<c:choose>
									<c:when test="${disabled or readOnly}">
										<input type="text" name="value[Date]" size="0" id="Date" class="form-control" readonly="readonly" value="<c:out value="${consultationNoteForm.view.note.values[  'Date']}"/>" disabled="disabled" placeholder="dd/mm/yyyy"/>
									</c:when>
									<c:otherwise>
										<input type="text" name="value[Date]" size="0" id="Date" class="form-control" value="<c:out value="${consultationNoteForm.view.note.values[  'Date']}"/>" 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='Date_DateTrigger' />
						</span>
						</div>
						
						<div class="fieldSet2Column">
							<span class="inputLabelAbove">Prior Info/Adjuvant Treatment Summary</span>
						</div>
						<div class="fieldSet2Column">
							<span class="inputControlWide"><smvc:textarea readonly="${readOnly}" path="value[AdjuvantTreatementSummary]" cols="30" rows="5" id="AdjuvantTreatementSummary" /></span>
						</div>
			
						<div class="fieldSet2Column">
							<span class="inputLabelAbove">Presentation</span>
						</div>
						<div class="fieldSet2Column">
							<span class="inputControlWide"><smvc:textarea readonly="${readOnly}" path="value[Presentation]" cols="30" rows="5" id="Presentation" /></span>
						</div>
			
						
											
					</td>
					
				</tr>			
			</table>

	</div>
	
	

	
		<div class="sectionSubPageTop">

			<h2>Investigation</h2>

			<table>
				<tr>
					<td width="50%">
							
							
						<div class="fieldSetLeftColumn">
							<span class="inputLabel">Biochemistry</span>
						</div>
						<div class="fieldSetRightColumn">
							<span class="inputControl"><smvc:input  readonly="${readOnly}" path="value[Biochemistry]" size="40" id="Biochemistry" /></span>
						</div>


						<div class="fieldSetLeftColumn">
							<span class="inputLabel">Liver USS</span>
						</div>
						<div class="fieldSetRightColumn">
							<span class="inputControl"><smvc:input  readonly="${readOnly}" path="value[LiverUSS]" size="40" id="LiverUSS" /></span>
						</div>
						
						
					</td>
					<td width="50%">
							
							
						<div class="fieldSetLeftColumn">
							<span class="inputLabel">Haematology</span>
						</div>
						<div class="fieldSetRightColumn">
							<span class="inputControl"><smvc:input  readonly="${readOnly}" path="value[Haematology]" size="40" id="Haematology" /></span>
						</div>

						<div class="fieldSetLeftColumn">
							<span class="inputLabel">Chest X-ray</span>
						</div>
						<div class="fieldSetRightColumn">
							<span class="inputControl"><smvc:input  readonly="${readOnly}" path="value[ChestXRay]" size="40" id="ChestXRay" /></span>
						</div>
						
						
					</td>
				</tr>
						
		</table>
		
		
		
			<div class="fieldSet2Column">
				<span class="inputLabelAbove">CT C/A/P</span>
			</div>
			<div class="fieldSet2Column">
				<span class="inputControlWide"><smvc:textarea readonly="${readOnly}" path="value[CTCAP]" cols="100" rows="5" id="CTCAP" /></span>
			</div>


			<div class="fieldSet2Column">
				<span class="inputLabelAbove">MRI</span>
			</div>
			<div class="fieldSet2Column">
				<span class="inputControlWide"><smvc:textarea readonly="${readOnly}" path="value[MRI]" cols="100" rows="5" id="MRI" /></span>
			</div>


			<div class="fieldSet2Column">
				<span class="inputLabelAbove">Bone Scan</span>
			</div>
			<div class="fieldSet2Column">
				<span class="inputControlWide"><smvc:textarea readonly="${readOnly}" path="value[BoneScan]" cols="100" rows="5" id="BoneScan" /></span>
			</div>
		
		
		<div class="fieldSetLeftColumn">Attach File</div>

		<div class="fieldSetRightColumn">
			<span class="inputLabel1"> <tiles:insertTemplate template="/emdt/tiles/fileContent.jsp">
					<tiles:putAttribute name="fieldName" value="RestagingAttachedFile"/>
					<tiles:putAttribute name="fieldWidth" value="0"/>
					<tiles:putAttribute name="parentPage" value="standard"/>
					<tiles:putAttribute name="disabled" value="${readOnly}"/>
				</tiles:insertTemplate>
			</span>
		</div>

	</div>




</div>

<br/>