<%@ page contentType="text/html; charset=UTF-8" %> 
<%@ include file="/includes.jsp" %>
<%@ taglib prefix="smvc" uri="http://www.springframework.org/tags/form" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>eMDT - Home</title>
	<link rel="icon" href="../images/emdt.ico" type="image/x-icon" />
	<link rel="shortcut icon" href="../images/emdt.ico" type="image/x-icon" />
	<link href="../referrals/css/screen.css" type="text/css" rel="stylesheet" />
	<link href="../referrals/css/main.css" type="text/css" rel="stylesheet" />
	<link rel="stylesheet" href="../css/webapp.css" type="text/css" />
	<script type="text/javascript" src="../js/jquery/jquery-3.7.1.min.js" ></script>
	<script type="text/javascript" src="../js/AJAXSupport.js" ></script>
<style>
.bodyContainer {
	width:100%;
	height:auto;
	float:left;
}
	</style>
</head>
<body>
		<table cellpadding="0" cellspacing="0" style="height:20px" width="100%">
			<!-- START MODULES -->
			<tr>
				<td height="1" valign="top" style="padding:0;">
					<tiles:insertTemplate template="/tiles/modules.jsp" flush="true">
						<tiles:putAttribute name="tempAttribute" value="moulya"></tiles:putAttribute>
					</tiles:insertTemplate>
				</td>
			</tr>
			<!-- END MODULES -->
</table>	
<div class="emdtCustomerLogoHolder"><img border="0" alt="logo" src="../images/customerLogo.png" style="width: 150px; height: 75px;" /></div>
<smvc:form id="emdtHome" method="get" action="emdtHome.form" >
<c:if test="${0 lt webapp.currentUser.remainingDaysPwdExpiryWarning}">
		<%@ include file="../referrals/tiles/passwordExpiryWarning.jsp" %>
</c:if>
<c:if test="${0 lt webapp.currentUser.remainingHrsPwdExpiryWarning}">
		<%@ include file="../referrals/tiles/passwordExpiryWarningToday.jsp" %>
</c:if>
<c:set var="msg" value='<%=request.getParameter("errorMsg")%>'/>
<c:choose>
			<c:when test="${requestScope.successMsg ne null || requestScope.errorMsg ne null}">
				<c:if test="${requestScope.successMsg ne null}">
						<div class="message"><img
							src="../images/16x16/information.png" alt="i" />
						<c:out value="${requestScope.successMsg}"/></div>
					</c:if>
					 <c:if test="${requestScope.errorMsg ne null}">
						<div class="error"><img src="../images/16x16/error.png" alt="!" border="0"/>&nbsp;&nbsp;<c:out value="${requestScope.errorMsg}"/></div><br/>
					</c:if>
					
					 <c:if test="${msg ne null}">
						<div class="error"><img src="../images/16x16/error.png" alt="!" border="0"/>&nbsp;&nbsp;<c:out value="${msg}"/></div><br/>
					</c:if>
			</c:when>
			<c:otherwise>
			<c:if test="${msg ne null}">
						<div class="error" align="center"><img src="../images/16x16/error.png" alt="!" border="0"/>&nbsp;&nbsp;<c:out value="${msg}"/></div><br/>
					</c:if>
			</c:otherwise>
</c:choose>
<div class="bodyContainer"><br/><br/>
	<div class="container">
		<div class="heading">&nbsp;<spring:message code="emdt.home.title" text="eMDT main menu" /></div>
	</div>
	<div class="rowSpacer" style="height:15px">
		&nbsp;
	</div>
	<div class="container">
		<div class="columnSpace">&nbsp;&nbsp;</div>
		<c:choose>
			<c:when test="${webapp.expiresIn <= 0}">
				<div class="rowSecondMiddle2" onclick="alert('This software license has expired and Patients can not be added')"><img  src="../referrals/images/imgReferAPatient.jpg" width="160" height="109"/><br/><spring:message code="emdt.home.addpatient" text="Add Patient" /></div>
			</c:when>
			<c:otherwise>
				<div class="rowSecondMiddle2" onclick="document.location.href = '../emdt/referralsDefinition.form?task=8&goToPage=emdt'"><img  src="../referrals/images/imgReferAPatient.jpg" width="160" height="109"/><br/><spring:message code="emdt.home.addpatient" text="Add Patient" /></div>
			</c:otherwise>
		</c:choose>
		<div class="columnSpace">&nbsp;&nbsp;</div>
		<div class="rowSecondMiddle2" onclick="document.location.href = 'patientSearch.form'"><img  src="../referrals/images/imgFindExisitngPatient.jpg" width="160" height="109"/><br/><spring:message code="emdt.home.findpatient" text="Find Patient" /></div>
		<sec:authorize access="hasAnyRole('ROLE_MEETINGS','ROLE_MEETING_ADMIN')">
			<div class="columnSpace">&nbsp;&nbsp;</div>
			<div class="rowSecondMiddle2" onclick="document.location.href = '../meetings/resumeMeeting.form'"><img  src="../referrals/images/meetingReferrals.jpg" width="160" height="109"/><br/><spring:message code="emdt.home.meetings" text="Meetings" /><br/></div>
		</sec:authorize>
		<div class="columnSpace">&nbsp;&nbsp;</div>
   		<div class="rowSecondMiddle2" onclick="document.location.href = '../emdt/reportMenu.jsp'"><img  src="../referrals/images/report.png" width="160" height="109"/><br/><spring:message code="emdt.home.reports" text="Reports" /><br/></div>
	    
	</div>
	<div class="rowSpacer" style="height:55px">
		&nbsp;
	</div>
	<div class="container">
			
		<sec:authorize access="hasAnyRole('ROLE_NMDM_SUBMITTER')">
			<div class="columnSpace">&nbsp;&nbsp;</div>
			<div class="rowThirdMiddle4" onclick="document.location.href = '../nationalMDT/patientnotsubmitted.form'"><br/><br/><br/><span class="spanUnregistered"><c:out value="${draftCount}"/>&nbsp;</span><span class="homepageButtonTitle"><spring:message code="emdt.home.drafts" text="Drafts not yet submitted to NMDM" /></span></div>
			<div class="columnSpace">&nbsp;&nbsp;</div>
			<div class="rowThirdMiddle2" onclick="document.location.href = '../nationalMDT/referralsIn.form'"><br/><br/><br/><span class="spanPatientsAssigned"><c:out value="${referralsInCount}"/>&nbsp;</span><span class="homepageButtonTitle"><spring:message code="emdt.home.submitted" text="Patients submitted to NMDM" /></span></div>
			<div class="columnSpace">&nbsp;&nbsp;</div>
			<div class="rowThirdMiddle3" onclick="document.location.href = '../emdt/responsesfromNationalTeam.form'"><br/><br/><br/><span class="spanResponseSent" style="color: blue;"><c:out value="${unacknowlegedPatientNo}"/>&nbsp;</span><span class="homepageButtonTitle"><spring:message code="emdt.home.nmdm.responses" text="Response from National MDT" /></span></div>
		</sec:authorize>
		<sec:authorize access="hasAnyRole('ROLE_MEETINGS','ROLE_MEETING_ADMIN')">
			<div class="columnSpace">&nbsp;&nbsp;</div>
			<div class="rowThirdMiddle1" onclick="document.location.href = '../emdt/patientInMeeting.form'"><br/><br/><br/><span class="spanPatientsInMeetings"><c:out value="${plannedMDTMeetingSize}"/>&nbsp;</span><span class="homepageButtonTitle"><spring:message code="emdt.home.patientsinmeetings" text="Patients in Meetings" /></span></div>
			<div class="columnSpace">&nbsp;&nbsp;</div>
		</sec:authorize>
	</div>
	<div class="rowSpacer" style="height:55px">
		&nbsp;
	</div>
	<div class="container">
	    <div class="columnSpace">&nbsp;&nbsp;</div>
		<div class="columnSpace">&nbsp;&nbsp;</div>
	</div>
	<div class="rowSpacer" align="center" >
		<a class="refreshLink" href="javascript:document.forms[0].submit();"><img src="../referrals/images/refresh.jpg"/>Refresh</a>
	</div>
	<div class="rowSpacer" style="height:55px">
		&nbsp;
	</div>
</div>
<%java.text.SimpleDateFormat crsdf = new java.text.SimpleDateFormat("yyyy");%>
<div align="center" class="pageFooter1" style="width:100%">
<div class="settingsHolder">&nbsp; <a href="#"  onclick="document.location.href = '../referrals/userSettings.jsp'"><img src="../images/16x16/cog.png"/>&nbsp;&nbsp;Settings..</a></div>
			Logged in as '<a href="../referrals/userform.form?userId=<c:out value="${webapp.currentUser.guid}"/>"><c:out value="${webapp.currentUser.username}"/></a>' | Copyright &#169; <a href="http://www.ardeo.com/" target="_blank">Ardeo Ltd.</a> 2000-<%=crsdf.format(new java.util.Date()) %> | Version: <c:out value="${webapp.version}"/> | <%@include file="/i18n.jsp" %>
			<div class="exitHolderRight1"><a href="../logout.form"><img src="../images/16x16/exit.png"/> Log out</a>&nbsp;</div>
</div>
</smvc:form>
</body>
</html>
	

	