<%@ include file="/includes.jsp"%>

<link href="../referrals/css/main.css" type="text/css" rel="stylesheet" />
<table width="100%">
	<tr>
		<td><br /></td>
	</tr>
	<tr>
		<td width="29%"></td>
		<td valign="top">
			<form name="selectSpeciality" action="../referrals/referralsPatient.form" method="post" onsubmit="return submitTheForm();">
				<fieldset>
					<legend>Choose Speciality </legend>
						<br />
						<c:choose>
						<c:when test="${referralsDefinitionList!=null and fn:length(referralsDefinitionList)>0}">
						<b>Please choose a Speciality or Pathway for this patient:</b> <br/> <br/>
						<center>

							<c:forEach var="referralsDefinition" items="${referralsDefinitionList}">
									<div class="menuButtonDiv" style="margin-bottom: 10px;"
										onclick="location.href='../emdt/referralsPatient.form?addnew=true&isReferral=false&referralDefId=<c:out value="${referralsDefinition.id}"/>'">
										<br /> <c:out value="${referralsDefinition.title}"/>
									</div>
							</c:forEach>
						</center>
		
						</c:when>
						<c:otherwise>
							<span class="info">No pathways have been defined for your location.</span>
						</c:otherwise>
						</c:choose>
									<div style="text-align: right; width: 100%;">
					<a href="../initialView.jsp">Cancel</a>
					</div>
				</fieldset>
			</form>
		</td>
		<td width="29%"></td>
	</tr>
</table>