<%@ include file="/includes.jsp"%>
<%@ taglib prefix="smvc" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<c:choose>
	<c:when test="${filterForm.name ne null }"><c:set var="nameOfForm" value="${filterForm.name}"></c:set></c:when>
	<c:otherwise><c:if test="${consultationNoteForm ne null}"><c:set var="nameOfForm" value="${consultationNoteForm.view.formName}"></c:set></c:if></c:otherwise>
</c:choose>
<c:set var="msg1" value='<%=request.getParameter("successMsg")%>' />
<c:if test="${webapp.roleManagement or ((0 ne emdt.currentCareSpell.referralDetails.referralStatus) and (1 ne emdt.currentCareSpell.referralDetails.referralStatus))}">
	<div class="menuSub2Holder">
		<div
			<c:choose>
		 		<c:when test="${'Response' eq nameOfForm and summaryName eq null and (addToMeeting eq null or addToMeeting ne true)}">class="menuButtonHolderYellowLong"</c:when>
				<c:otherwise>class="menuButtonHolderBlueLong"</c:otherwise>
			</c:choose>
			><a href='../referrals/consultationNote.form?csId=<c:out value="${emdt.currentCareSpell.id}"/>&formName=Response;'>
			<br />
			<c:if test="${(0 eq emdt.currentCareSpell.referralDetails.referralStatus) or (1 eq emdt.currentCareSpell.referralDetails.referralStatus)}">
				<span>Create/Edit Response<br />To Referrer</span>
			</c:if>
			<c:if test="${(2 eq emdt.currentCareSpell.referralDetails.referralStatus) or (3 eq emdt.currentCareSpell.referralDetails.referralStatus) or (null eq emdt.currentCareSpell.referralDetails.referralStatus )}">
				<span>View Response<br />To Referrer</span>
			</c:if></a>
		</div>
		<div
			<c:choose>
		 		<c:when test="${addToMeeting eq true}">class="menuButtonHolderYellowLong"</c:when>
				<c:otherwise>class="menuButtonHolderBlueLong"</c:otherwise>
			</c:choose>
			><a href='../referrals/addCurrentPatientToNextMeeting.form?task=selectNextMeeting'>
			<br />Add to next MDT <br />Meeting</a>
		</div>
		<c:if test="${patientDetailsPage eq 'true' and 'true' eq status || true eq status}">
			<div class="menuButtonHolderBlueLong"><a href="javascript:makeNewReferral();"><br />Make a new<br />referral</a></div>
		</c:if>
	</div>
</c:if>
<c:if test="${'Response' eq nameOfForm and (msg1 ne null and fn:length(msg1) ne 0)}">
	    &nbsp;<br />
	<br /><br /><br /><br />
	<div class="blueContainer"><br />&nbsp; Please click the following folder link to view print PDF files:
	<a href='file://${emdt.printDestinationUrl}' target="_blank">
	<img src="../images/16x16/folder.png" border="0" alt="folder" /><c:out value="${emdt.printDestinationUrl}"/></a>
	<br /><br /></div><br />
</c:if>


