<%@ include file="/includes.jsp" %>
<%@ taglib prefix="smvc" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<script type="text/javascript">
function changeSummary(summaryId){
	document.location="changeSummary.form?forward=patientSummary&summaryId="+summaryId;
}
</script>
<br/>
<c:set var="forwardOnError" value="meetingPatientSummary" scope="request"/>
	Summary:&nbsp
	<select name="summaryId" onchange="changeSummary(this.options[this.selectedIndex].value);">
		<option value=""></option>
		<c:forEach var="summary" items="${emdt.patientSummaries}">
	 		<option value="<c:out value="${summary.id}"/>"  <c:if test="${emdt.currentMeeting.summaryId != null and emdt.currentMeeting.summaryId eq summary.id }">selected="selected"</c:if> >
				<c:out value="${summary.title}"/></option>
		</c:forEach>
	</select>
<c:if test="${emdt.currentMeeting.summaryId != null }">
	<emdt:runSummary summaryId="${emdt.currentMeeting.summaryGuid}" patientId="${emdt.currentMeeting.currentItem.patientDiscussed.guid }" />
	<table width="95%">
		<tr>
			<td>
				<c:set var="cnDetails" value="fromMeeting" scope="request"/>
				<tiles:insertTemplate template ="/emdt/tiles/patientSummaryTile.jsp"/>
			</td>
		</tr>
	</table>
</c:if>