<%@ 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">

	<div class="sectionSubPageTop">

		<input type="hidden" value="false" id="unsaveButtonId" />
		<h2>Post Neoadjuvant Review</h2>

		<div class="fieldSet2Column">
			<span class="inputLabelAbove">Presented By</span>
		</div>
		<div class="fieldSet2Column">
			<span class="inputControl">
				<c:set var="tempOptionsMapName" value="${consultationNoteForm.view.form.getField('PresentedBy').optionsMapName }"/>
				<webapp:namedListSpring path='value[PresentedBy]'  id="PresentedBy" disabled="${readOnly}" domain="EMDT" name="${tempOptionsMapName}"
					currentValue="${consultationNoteForm.value['PresentedBy']}" nlFromFormDefinition="${namedListMap['EMDT'][tempOptionsMapName]}"/>
			</span>
		</div>

		<div class="fieldSet2Column">
			<span class="inputLabelAbove">Date of last chemo</span>
		</div>
		<div class="fieldSet2Column">
			<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.getValue('Date').code}"/>"
								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.getValue('Date').code}"/>"
								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>&nbsp;</div>
		<div class="fieldSet2Column">
			<span class="inputLabelAbove">Primary/Neoadjuvant treatment</span>
		</div>
		<div class="fieldSet2Column">
			<span class="inputControlWide"><smvc:textarea readonly="${readOnly}" path="value[PrimaryNeoadTreatment]" cols="100" rows="5" id="PrimaryNeoadTreatment" /></span>
		</div>

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

		<div class="fieldSet2Column">
		<span class="inputControl">
			<tiles:insertTemplate template="/emdt/tiles/fileContent.jsp" flush="false">
				<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>
			</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="${consultationNoteForm.view.form.getField('Grade').optionsMapName}"/>
								<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">

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


<br/>