<div id="alreadyReferedId" class="alreadyReferedPopup" style="display: none;">
<table align="center" border="0" width="100%" id="alreadyReferedIdTable" bgcolor="white">
	<tr>
		<td align="center" width="99%" valign="middle" height="100%">
		<table class="dialogBox" cellpadding="4" border="0" width="100%">
			<tr class="tableHeader">
				<th colspan="3" class="tableColHeader">Note that this patient
				has already been referred. Would you like to notify <c:out value="${centralHubHospital.hospitalName}"/> that
				you have provided new or amended information?</th>
			</tr>
			<tr>
				<td colspan="3" align="center" height="100%"><a href="#"
					onclick="sendRereferingPatientMsg('YES','<c:out value="${consultationNoteForm.view.formName}"/>','null');"><img
					src="../referrals/images/yes.png" title="Send a message"
					height="30" /></a>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

				<a href="#"
					onclick="sendRereferingPatientMsg('NO','<c:out value="${consultationNoteForm.view.formName}"/>','null');"><img
					src="../referrals/images/no.png" title="Don't send a message"
					height="30" /></a></td>
			</tr>
		</table>
		</td>
	</tr>
</table>
</div>

<div id="alreadyReferdRespMsgId" class="alreadyReferedRespMsgPopup"
	style="display: none;">
<table align="center" border="0" width="100%"
	id="alreadyReferdRespMsgTable" bgcolor="white">
	<tr>
		<td align="center" width="99%" valign="middle" height="100%">
		<table class="dialogBox" cellpadding="4" border="0" width="100%">
			<tr class="tableHeader">
				<th colspan="3" class="tableColHeader">Images Requested.</th>
			</tr>
		</table>
		</td>
	</tr>
</table>
</div>

<%@ include file="/includes.jsp"%>
<div id="messagesSentDivId" class="alreadyReferedRespMsgPopup"
	style="display: none;">
<table align="center" border="0" width="100%"
	id="messagesSentMsgTable" bgcolor="white">
	<tr>
		<td align="center" width="99%" valign="middle" height="100%">
		<table class="dialogBox" cellpadding="4" border="0" width="100%">
			<tr class="tableHeader">
				<th colspan="3" class="tableColHeader">Notification messages sent.</th>
			</tr>
		</table>
		</td>
	</tr>
</table>
</div>


<div id="alreadyReferedImagingFormId"
	class="alreadyReferedImageStudyPopup" style="display: none;">
<table align="center" border="0" width="100%"
	id="alreadyReferedImagingFormTable" bgcolor="white">
	<tr>
		<td align="center" width="99%" valign="middle" height="100%">
		<table class="dialogBox" cellpadding="4" border="0" width="100%">
			<tr class="tableHeader">
				<th colspan="3" class="tableColHeader">Would you like to to
				send this image study to <c:out value="${centralHubHospital.hospitalName}"/>?</th>
			</tr>
			<tr id="alreadyReferedImagingY&NId">
				<td colspan="3" align="center" height="100%"><a href="#"
					onclick="openSendRereferingPatientFm();"><img
					src="../referrals/images/yes.png" title="Send images" height="30" /></a>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

				<a href="#"
					onclick="sendRereferingPatientMsg('NO','<c:out value="${consultationNoteForm.view.formName}"/>','informBasingstoke');"><img
					src="../referrals/images/no.png" title="No, do not send images"
					height="30" /></a></td>
			</tr>
			<tr id="alreadyReferedImagingSubId" style="display: none;">
				<td id="" colspan="3">
				<table width="100%">
					<tr>
						<td colspan="2" height="20"></td>
					</tr>
					<tr>
						<td width="40%">Image Transfer method</td>
						<td width="60%">
						<fieldset>
							<select name="imgTransferMethods" id="imageTransferMethodId" class="selectBox">			
							    <c:if test="${imageTransferMethods != null and fn:length(imageTransferMethods) != 0}">
									<c:forEach  var="transferMethod" items="${imageTransferMethods}" >
										<c:choose>
											<c:when test="${transferMethod.isPreferred}">
												<option selected="selected" value="<c:out value="${transferMethod.imgTansMethod.imgTransCode}"/>"><c:out value="${transferMethod.imgTansMethod.description}"/></option>
											</c:when>
											<c:otherwise>
												<option value="<c:out value="${transferMethod.imgTansMethod.imgTransCode}"/>"><c:out value="${transferMethod.imgTansMethod.description}"/></option>
											</c:otherwise>
										</c:choose>
									</c:forEach>
									</c:if>
								</select>
							</fieldset>	
						</td>
					</tr>
					<tr>
						<td colspan="2" height="20"></td>
					</tr>
					<tr>
						<td colspan="2" align="right" height="100%"><a href="#"
							onclick="sendRereferingPatientMsg('YES','<c:out value="${consultationNoteForm.view.formName}"/>','informBasingstoke');"><img
							src="../referrals/images/submit.png" title="Send images"
							height="30" /></a>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

						<a href="#"
							onclick="closeSendRereferingPatientFm();"><img
							src="../referrals/images/Cancel.png" title="No, do not send images"
							height="30" /></a></td>
					</tr>
				</table>

				</td>
			</tr>

		</table>
		</td>
	</tr>
</table>
</div>
