<%@ 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="menuButtonRect yellow"</c:when>
				<c:otherwise>class="menuButtonRect blue"</c:otherwise>
			</c:choose>
		>
			<a href="consultationNote.form?csId=<c:out value="${emdt.currentCareSpell.id}"/>&formName=Response&amp;filterFormId=<c:out value="${consultationNoteForm.view.form.id}"/>'">

				<c:if test="${(0 eq emdt.currentCareSpell.referralDetails.referralStatus) or (1 eq emdt.currentCareSpell.referralDetails.referralStatus)}">
					Create/Edit Response<br />To Referrer
				</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 )}">
					View Response<br />To Referrer
				</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>
			onclick="location.href='../referrals/addCurrentPatientToNextMeeting.form?task=selectNextMeeting'">
			<br />Add to next MDT <br />Meeting
		</div> --%>
		<c:if test="${patientDetailsPage eq 'true' and 'true' eq status || true eq status}">
			<div class="menuButtonRect blue" onclick="makeNewReferral();">Make a new<br />referral</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://<c:out value="${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>


