Skip to content
Snippets Groups Projects
Commit 9da70c99 authored by adityab3's avatar adityab3
Browse files
parents 1e8572f1 11255812
No related branches found
No related tags found
1 merge request!26UC14
Showing
with 1179 additions and 200 deletions
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="test">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="test">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="ignore_optional_problems" value="true"/>
<attribute name="m2e-apt" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
......@@ -45,4 +45,15 @@
<nature>net.sourceforge.metrics.nature</nature>
<nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
</natures>
<filteredResources>
<filter>
<id>1605131018689</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=false
......@@ -8,6 +8,10 @@ org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/iTrust/test/edu/ncsu/csc/itrust/unit/DBBuilder.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="edu.ncsu.csc.itrust.unit.DBBuilder"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="iTrust"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/iTrust/test/edu/ncsu/csc/itrust/unit/DBBuilder.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="edu.ncsu.csc.itrust.unit.DBBuilder"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="iTrust"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/iTrust/test/edu/ncsu/csc/itrust/unit/datagenerators/TestDataGenerator.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="edu.ncsu.csc.itrust.unit.datagenerators.TestDataGenerator"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="iTrust"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
</launchConfiguration>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/iTrust/test/edu/ncsu/csc/itrust/unit/datagenerators/TestDataGenerator.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="edu.ncsu.csc.itrust.unit.datagenerators.TestDataGenerator"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="iTrust"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
</launchConfiguration>
......@@ -31,6 +31,18 @@
</ul>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" anim-type="collapse" anim-target="#messaging-menu">
<h2 class="panel-title">Messaging</h2>
</div>
<div class="panel-body" id="messaging-menu">
<ul class="nav nav-sidebar">
<li><a href="/iTrust/auth/admin/viewReminderOutbox.jsp">Reminder Message Outbox</a></li>
</ul>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" anim-type="collapse" anim-target="#other-menu">
<h2 class="panel-title">Other</h2>
......@@ -44,6 +56,7 @@
<li><a href="/iTrust/auth/admin/sessionTimeout.jsp">Change Global Session Timeout </a></li>
<li><a href="/iTrust/auth/surveyResults.jsp">Satisfaction Survey Results</a></li>
<li><a href="/iTrust/auth/admin/activatePatient.jsp">Activate Patient</a></li>
<li><a href="/iTrust/auth/admin/sendAppointmentReminders.jsp">Send Appointment Reminders</a></li>
</ul>
</div>
</div>
\ No newline at end of file
<%@page errorPage="/auth/exceptionHandler.jsp"%>
<%@page import="edu.ncsu.csc.itrust.action.ViewMyMessagesAction"%>
<%@page import="edu.ncsu.csc.itrust.beans.MessageBean"%>
<%@page import="java.util.List"%>
<%@include file="/global.jsp" %>
<%
pageTitle = "iTrust - View Message";
%>
<%@include file="/header.jsp" %>
<%
ViewMyMessagesAction action = new ViewMyMessagesAction(prodDAO, loggedInMID.longValue());
MessageBean original = null;
loggingAction.logEvent(TransactionType.OUTBOX_VIEW, loggedInMID.longValue(), 0, "");
if (request.getParameter("msg") != null) {
String msgParameter = request.getParameter("msg");
int msgIndex = 0;
try {
msgIndex = Integer.parseInt(msgParameter);
} catch (NumberFormatException nfe) {
response.sendRedirect("viewReminderOutbox.jsp");
}
List<MessageBean> messages = null;
if (session.getAttribute("messages") != null) {
messages = (List<MessageBean>) session.getAttribute("messages");
if(msgIndex > messages.size() || msgIndex < 0) {
msgIndex = 0;
response.sendRedirect("oops.jsp");
}
} else {
response.sendRedirect("viewReminderOutbox.jsp");
}
original = (MessageBean)messages.get(msgIndex);
session.setAttribute("message", original);
}
else {
response.sendRedirect("viewReminderOutbox.jsp");
}
%>
<div>
<table width="99%">
<tr>
<td><b>To:</b> <%= StringEscapeUtils.escapeHtml("" + ( action.getName(original.getTo()) )) %></td>
</tr>
<tr>
<td><b>Subject:</b> <%= StringEscapeUtils.escapeHtml("" + ( original.getSubject() )) %></td>
</tr>
<tr>
<td><b>Date &amp; Time:</b> <%= StringEscapeUtils.escapeHtml("" + ( original.getSentDate() )) %></td>
</tr>
</table>
</div>
<table>
<tr>
<td colspan="2"><b>Message:</b></td>
</tr>
<tr>
<td colspan="2"><%= StringEscapeUtils.escapeHtml("" + ( original.getBody() )).replace("\n","<br/>") %></td>
</tr>
<tr>
<td colspan="2"><a href="viewReminderOutbox.jsp">Back</a></td>
</tr>
</table>
<%@include file="/footer.jsp" %>
\ No newline at end of file
<%@taglib prefix="itrust" uri="/WEB-INF/tags.tld"%>
<%@page errorPage="/auth/exceptionHandler.jsp"%>
<%@page import="edu.ncsu.csc.itrust.action.SendRemindersAction" %>
<%@page import="edu.ncsu.csc.itrust.exception.ITrustException" %>
<%@page import="java.lang.NumberFormatException" %>
<%@include file="/global.jsp" %>
<%
pageTitle = "iTrust - Send Reminder Message";
%>
<%@include file="/header.jsp" %>
<%
String input = request.getParameter("withinDays");
if (input != null && !input.equals("")) {
try {
int days = Integer.valueOf(input);
if (days <= 0) {
%>
<span class="iTrustError"><%=StringEscapeUtils.escapeHtml("Provide a positive number") %></span>
<%
}
else {
SendRemindersAction action = new SendRemindersAction(prodDAO, loggedInMID.longValue());
action.sendReminderForAppointments(days);
%>
<span class="iTrustMessage"><%=StringEscapeUtils.escapeHtml("Reminders were successfully sent") %></span>
<%
}
} catch (NumberFormatException | ITrustException e) {
%>
<span class="iTrustError"><%=StringEscapeUtils.escapeHtml("Reminders failed to send. Please provide a positive number") %></span>
<%
}
}
%>
<div class="page-header"><h1>Send Reminder Message</h1></div>
<form method="post">
<h4> Send reminders to all patients with an appointment within the next n days. Provide n: </h4>
<input type="text" name="withinDays"></td>
<input type="submit" style="font-size: 12pt; font-weight: bold;" value="Send Appointment Reminders">
</form>
<%@include file="/footer.jsp" %>
\ No newline at end of file
<%@page errorPage="/auth/exceptionHandler.jsp"%>
<%@page import="java.util.List"%>
<%@page import="edu.ncsu.csc.itrust.action.ViewMyMessagesAction"%>
<%@page import="edu.ncsu.csc.itrust.beans.MessageBean"%>
<%@page import="edu.ncsu.csc.itrust.dao.DAOFactory"%>
<%@include file="/global.jsp" %>
<%
pageTitle = "iTrust - View My Sent Messages";
%>
<%@include file="/header.jsp" %>
<div align=center>
<h2>Sent Reminders</h2>
<%
loggingAction.logEvent(TransactionType.OUTBOX_VIEW, loggedInMID.longValue(), loggedInMID.longValue(), "");
ViewMyMessagesAction action = new ViewMyMessagesAction(prodDAO, 9000000009L);
List<MessageBean> messages = null;
if(request.getParameter("sortby") != null) {
if(request.getParameter("sortby").equals("name")) {
if(request.getParameter("sorthow").equals("asce")) {
messages = action.getAllMySentMessagesNameAscending();
} else {
messages = action.getAllMySentMessagesNameDescending();
}
} else if(request.getParameter("sortby").equals("time")) {
if(request.getParameter("sorthow").equals("asce")) {
messages = action.getAllMySentMessagesTimeAscending();
} else {
messages = action.getAllMySentMessages();
}
}
}
else {
messages = action.getAllMySentMessages();
}
session.setAttribute("messages", messages);
if (messages.size() > 0) { %>
<br />
<table class="fancyTable">
<tr>
<th>To</th>
<th>Subject</th>
<th>Sent</th>
<th></th>
</tr>
<% int index = 0; %>
<% for(MessageBean message : messages) { %>
<tr <%=(index%2 == 1)?"class=\"alt\"":"" %>>
<td><%= StringEscapeUtils.escapeHtml("" + ( action.getName(message.getTo()) )) %></td>
<td><%= StringEscapeUtils.escapeHtml("" + ( message.getSubject() )) %></td>
<td><%= StringEscapeUtils.escapeHtml("" + ( message.getSentDate() )) %></td>
<td><a href="reminderMessage.jsp?msg=<%= StringEscapeUtils.escapeHtml("" + ( index )) %>">Read</a></td>
</tr>
<% index ++; %>
<% } %>
</table>
<% } else { %>
<div>
<i>No reminders sent</i>
</div>
<% } %>
<br />
</div>
<%@include file="/footer.jsp" %>
\ No newline at end of file
<%@taglib uri="/WEB-INF/tags.tld" prefix="itrust"%>
<%@page errorPage="/auth/exceptionHandler.jsp"%>
<%@page import="edu.ncsu.csc.itrust.dao.mysql.CauseOfDeathTrendsReportDAO"%>
<%@page import="edu.ncsu.csc.itrust.beans.CauseOfDeathTrendsReportBean"%>
<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.Iterator"%>
<%@page import="edu.ncsu.csc.itrust.exception.FormValidationException"%>
<%@include file="/global.jsp" %>
<%
pageTitle = "iTrust - View Cause-Of-Death Trends Report";
String view = request.getParameter("viewSelect");
%>
<%@include file="/header.jsp" %>
<%
//log the page view
loggingAction.logEvent(TransactionType.DEATH_TRENDS_VIEW, loggedInMID.longValue(), 0, "View cause-of-death trends report");
CauseOfDeathTrendsReportDAO report = new CauseOfDeathTrendsReportDAO(prodDAO);
List<CauseOfDeathTrendsReportBean> allDeaths = null;
//get form data
long mid = Long.valueOf(request.getUserPrincipal().getName());
String startDate = request.getParameter("startDate");
String endDate = request.getParameter("endDate");
String gender = request.getParameter("gender");
String patients = request.getParameter("patients");
if (patients == null)
patients = "";
//try to get the report. If there's an error, print it. If null is returned, it's the first page load
if(patients.equalsIgnoreCase("My Patients")) {
try {
allDeaths = report.getTopTwoDeathsForHCP(mid, gender, startDate, endDate);
} catch(FormValidationException e){
e.printHTML(pageContext.getOut());
}
}
if(patients.equalsIgnoreCase("All Patients") || patients.equalsIgnoreCase("")) {
try {
allDeaths = report.getTopTwoDeathsForAll(gender, startDate, endDate);
} catch(FormValidationException e){
e.printHTML(pageContext.getOut());
}
}
if (gender == null)
gender = "";
if (startDate == null)
startDate = "";
if (endDate == null)
endDate = "";
%>
<br />
<form action="causeOfDeathTrendsReport.jsp" method="post" id="formMain">
<input type="hidden" name="viewSelect" />
<table class="fTable" align="center" id="causeOfDeathTrendsReportTable">
<tr>
<th colspan="4">Cause of Death Trends Report</th>
</tr>
<tr class="subHeader">
<td>Patients:</td>
<td>
<select name="patients" style="font-size:10" >
<%
if (patients != null && !patients.equalsIgnoreCase("")) {
if (patients.equalsIgnoreCase("All Patients")) {
%>
<option selected="selected" value="All Patients"> All Patients </option>
<option value="My Patients"> My Patients </option>
<%
} else if (patients.equalsIgnoreCase("My Patients")) {
%>
<option value="All Patients"> All Patients </option>
<option selected="selected" value="My Patients"> My Patients </option>
<%
}
} else {
%>
<option value="All Patients"> All Patients </option>
<option value="My Patients"> My Patients </option>
</select>
<%
}
%>
</td>
<td>Gender:</td>
<td>
<select name="gender" style="font-size:10" >
<%
if (gender != null && !gender.equalsIgnoreCase("")) {
if (gender.equalsIgnoreCase("All")) {
%>
<option selected="selected" value="All"> All </option>
<option value="Male"> Male </option>
<option value="Female"> Female </option>
<%
} else if(gender.equalsIgnoreCase("Male")){
%>
<option value="All"> All </option>
<option selected="selected" value="Male"> Male </option>
<option value="Female"> Female </option>
<%
} else if(gender.equalsIgnoreCase("Female")){
%>
<option value="All"> All </option>
<option value="Male"> Male </option>
<option selected="selected" value="Female"> Female </option>
<%
}
} else {
%>
<option value="All"> All </option>
<option value="Male"> Male </option>
<option value="Female"> Female </option>
</select>
<% } %>
</td>
</tr>
<tr class="subHeader">
<td>Start Date:</td>
<td>
<input name="startDate" value="<%= StringEscapeUtils.escapeHtml("" + (startDate)) %>" size="10">
<input type=button value="Select Date" onclick="displayDatePicker('startDate');">
</td>
<td>End Date:</td>
<td>
<input name="endDate" value="<%= StringEscapeUtils.escapeHtml("" + (endDate)) %>" size="10">
<input type=button value="Select Date" onclick="displayDatePicker('endDate');">
</td>
</tr>
<tr>
<td colspan="4" style="text-align: center;"><input type="submit" id="view_report" value="View Report"></td>
</tr>
</table>
</form>
<br />
<% if (allDeaths != null) { %>
<table class="fTable" align="center" id="causeOfDeathTrendsTable">
<tr>
<th>ICD-9CM Name</th>
<th>ICD-9CM Code</th>
<th>Quantity of Deaths</th>
</tr>
<%
Iterator<CauseOfDeathTrendsReportBean> iterator = allDeaths.iterator();
while(iterator.hasNext()) {
CauseOfDeathTrendsReportBean reports = iterator.next();
%>
<tr style="text-align:center;">
<td><%=reports.getCause()%></td>
<td><%=reports.getCode()%></td>
<td><%=reports.getDeaths()%></td>
</tr>
<%
}
%>
</table>
<% } %>
<br />
<%@include file="/footer.jsp" %>
\ No newline at end of file
......@@ -23,6 +23,8 @@
<li><a href="/iTrust/auth/hcp-nutritionist/macronutrients.jsp">Patient Macronutrient Intake</a>
<li><a href="/iTrust/auth/hcp-fitness/viewExerciseDiaries.jsp">Patient Exercise Diaries</a>
<li><a href="/iTrust/auth/hcp/viewSleepDiaries.jsp">Patient Sleep Diaries</a>
<li><a href="/iTrust/auth/hcp/causeOfDeathTrendsReport.jsp">Cause-Of-Death Trends Report</a>
</ul>
</div>
</div>
......
<%@page import="java.text.ParseException"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="edu.ncsu.csc.itrust.action.EditApptAction"%>
<%@page import="edu.ncsu.csc.itrust.action.EditApptTypeAction"%>
<%@page import="edu.ncsu.csc.itrust.beans.ApptBean"%>
<%@page import="edu.ncsu.csc.itrust.beans.ApptTypeBean"%>
<%@page import="edu.ncsu.csc.itrust.dao.mysql.ApptTypeDAO"%>
<%@page errorPage="/auth/exceptionHandler.jsp"%>
<%@page import="java.util.List"%>
<%@page import="edu.ncsu.csc.itrust.action.ViewMyApptsAction"%>
<%@page import="edu.ncsu.csc.itrust.exception.FormValidationException"%>
<%@page import="edu.ncsu.csc.itrust.exception.ITrustException"%>
<%@include file="/global.jsp"%>
<%
pageTitle = "iTrust - Appointment Requests";
%>
<%@include file="/header.jsp"%>
<%
EditApptAction editAction = new EditApptAction(prodDAO, loggedInMID.longValue());
ApptTypeDAO apptTypeDAO = prodDAO.getApptTypeDAO();
String msg = "";
long hcpid = 0L;
String comment = "";
String date = "";
String hourI = "";
String minuteI = "";
String tod = "";
String apptType = "";
String prompt = "";
ApptBean original = null;
String aptParameter = "";
if (request.getParameter("apt") != null) {
aptParameter = request.getParameter("apt");
try {
int apptID = Integer.parseInt(aptParameter);
original = editAction.getAppt(apptID);
if (original == null){
response.sendRedirect("viewMyAppts.jsp");
}
} catch (NullPointerException npe) {
response.sendRedirect("viewMyAppts.jsp");
} catch (NumberFormatException e) {
// Handle Exception
response.sendRedirect("viewMyAppts.jsp");
}
} else {
response.sendRedirect("viewMyAppts.jsp");
}
Long patientID = 0L;
if (session.getAttribute("pid") != null) {
String pidString = (String) session.getAttribute("pid");
patientID = Long.parseLong(pidString);
try {
editAction.getName(patientID);
} catch (ITrustException ite) {
patientID = 0L;
}
}
boolean hideForm = false;
boolean error = false;
String hidden = "";
Date oldDate = new Date(original.getDate().getTime());
DateFormat dFormat = new SimpleDateFormat("MM/dd/yyyy");
DateFormat tFormat = new SimpleDateFormat("hhmma");
String hPart = tFormat.format(oldDate).substring(0,2);
String mPart = tFormat.format(oldDate).substring(2,4);
String aPart = tFormat.format(oldDate).substring(4);
String lastSchedDate=dFormat.format(oldDate);
String lastApptType=original.getComment();
String lastTime1=hPart;
String lastTime2=mPart;
String lastTime3=aPart;
String lastComment=original.getComment();
if(lastComment == null) lastComment="";
if (request.getParameter("editAppt") != null && request.getParameter("apptID") != null) {
String headerMessage = "";
if (request.getParameter("editAppt").equals("Remove")) {
// Delete the appointment
ApptBean appt = new ApptBean();
appt.setApptID(Integer.parseInt(request.getParameter("apptID")));
headerMessage = editAction.removeAppt(appt);
if(headerMessage.startsWith("Success")) {
hideForm = true;
session.removeAttribute("pid");
loggingAction.logEvent(TransactionType.APPOINTMENT_REMOVE,
loggedInMID.longValue(), original.getPatient(), ""+original.getApptID());
%>
<div align=center>
<span class="iTrustMessage"><%=StringEscapeUtils.escapeHtml(headerMessage)%></span>
</div>
<%
} else {
%>
<div align=center>
<span class="iTrustError"><%=StringEscapeUtils.escapeHtml(headerMessage)%></span>
</div>
<%
}
}
}
%>
<h1>Cancel Existing Appointment</h1>
<%
if (msg.contains("ERROR")) {
%>
<span class="iTrustError"><%=msg%></span>
<%
} else {
%>
<span class="iTrustMessage"><%=msg%></span>
<%
}
%>
<%=prompt%>
<%
Date d = new Date(original.getDate().getTime());
DateFormat format = new SimpleDateFormat("MM/dd/yyyy hh:mm a");
%>
<div>
<h4>The following appointment will be canceled by pressing the "Cancel Appointment" button.</h4>
<p><b>Patient:</b> <%= StringEscapeUtils.escapeHtml("" + ( editAction.getName(original.getPatient()) )) %></p>
<p><b>HCP:</b> <%= StringEscapeUtils.escapeHtml("" + ( editAction.getName(original.getHcp()) )) %></p>
<p><b>Type:</b> <%= StringEscapeUtils.escapeHtml("" + ( original.getApptType() )) %></p>
<p><b>Date/Time:</b> <%= StringEscapeUtils.escapeHtml("" + ( format.format(d) )) %></p>
<p><b>Duration:</b> <%= StringEscapeUtils.escapeHtml("" + ( apptTypeDAO.getApptType(original.getApptType()).getDuration()+" minutes" )) %></p>
</div>
<%
if(!hideForm){
%>
<form id="mainForm" type="hidden" method="post" action="cancelApptPatient.jsp?apt=<%=aptParameter %>&apptID=<%=original.getApptID() %>">
<input type="submit" value="Cancel Appointment" name="editApptButton" id="removeButton" onClick="document.getElementById('editAppt').value='Remove';"/>
<input type="hidden" id="editAppt" name="editAppt" value=""/>
</form>
<%
}
%>
<%@include file="/footer.jsp"%>
<%@page import="java.text.ParseException"%>
<%@page import="java.sql.Timestamp"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="edu.ncsu.csc.itrust.action.EditApptAction"%>
<%@page import="edu.ncsu.csc.itrust.beans.ApptBean"%>
<%@page import="edu.ncsu.csc.itrust.beans.ApptTypeBean"%>
<%@page import="edu.ncsu.csc.itrust.dao.mysql.ApptTypeDAO"%>
<%@page import="edu.ncsu.csc.itrust.beans.HCPVisitBean"%>
<%@page import="edu.ncsu.csc.itrust.action.ViewVisitedHCPsAction"%>
<%@page errorPage="/auth/exceptionHandler.jsp"%>
<%@page import="edu.ncsu.csc.itrust.action.AddApptRequestAction"%>
<%@page import="edu.ncsu.csc.itrust.beans.ApptRequestBean"%>
<%@page import="java.util.List"%>
<%@page import="edu.ncsu.csc.itrust.action.ViewMyApptsAction"%>
<%@page import="edu.ncsu.csc.itrust.exception.FormValidationException"%>
<%@page import="edu.ncsu.csc.itrust.exception.ITrustException"%>
<%@include file="/global.jsp"%>
<%
pageTitle = "iTrust - Appointment Requests";
%>
<%@include file="/header.jsp"%>
<%
EditApptAction editAction = new EditApptAction(prodDAO, loggedInMID.longValue());
AddApptRequestAction action = new AddApptRequestAction(prodDAO); //ViewAppt in HCP
ViewVisitedHCPsAction hcpAction = new ViewVisitedHCPsAction(
prodDAO, loggedInMID.longValue()); //ViewAppt in HCP
List<HCPVisitBean> visits = hcpAction.getVisitedHCPs();
ApptTypeDAO apptTypeDAO = prodDAO.getApptTypeDAO();
List<ApptTypeBean> apptTypes = apptTypeDAO.getApptTypes();
String msg = "";
long hcpid = 0L;
String comment = "";
String date = "";
String hourI = "";
String minuteI = "";
String tod = "";
String apptType = "";
String prompt = "";
ViewMyApptsAction viewAction = new ViewMyApptsAction(prodDAO, loggedInMID.longValue());
ApptBean original = null;
String aptParameter = "";
if (request.getParameter("apt") != null) {
aptParameter = request.getParameter("apt");
try {
int apptID = Integer.parseInt(aptParameter);
original = editAction.getAppt(apptID);
if (original == null){
response.sendRedirect("viewMyApptsPatient.jsp");
}
} catch (NullPointerException npe) {
response.sendRedirect("viewMyApptsPatient.jsp");
} catch (NumberFormatException e) {
// Handle Exception
response.sendRedirect("viewMyApptsPatient.jsp");
}
} else {
response.sendRedirect("viewMyApptsPatient.jsp");
}
Long patientID = 0L;
if (session.getAttribute("pid") != null) {
String pidString = (String) session.getAttribute("pid");
patientID = Long.parseLong(pidString);
try {
editAction.getName(patientID);
} catch (ITrustException ite) {
patientID = 0L;
}
}
boolean hideForm = false;
Date oldDate = new Date(original.getDate().getTime());
DateFormat dFormat = new SimpleDateFormat("MM/dd/yyyy");
DateFormat tFormat = new SimpleDateFormat("hhmma");
String hPart = tFormat.format(oldDate).substring(0,2);
String mPart = tFormat.format(oldDate).substring(2,4);
String aPart = tFormat.format(oldDate).substring(4);
String lastSchedDate=dFormat.format(oldDate);
String lastApptType=original.getComment();
String lastTime1=hPart;
String lastTime2=mPart;
String lastTime3=aPart;
String lastComment=original.getComment();
if(lastComment == null) lastComment="";
if (request.getParameter("editAppt") != null && request.getParameter("apptID") != null) {
String headerMessage = "";
if (request.getParameter("editAppt").equals("Request")) {
ApptBean appt = new ApptBean();
appt.setPatient(loggedInMID);
hcpid = Long.parseLong(request.getParameter("lhcp"));
appt.setHcp(hcpid);
comment = request.getParameter("comment");
appt.setComment(comment);
SimpleDateFormat frmt = new SimpleDateFormat("MM/dd/yyyy hh:mm a");
date = request.getParameter("startDate");
date = date.trim();
hourI = request.getParameter("time1");
minuteI = request.getParameter("time2");
tod = request.getParameter("time3");
apptType = request.getParameter("apptType");
appt.setApptType(apptType);
try {
if(date.length() == 10){
Date d = frmt.parse(date + " " + hourI + ":" + minuteI + " " + tod);
appt.setDate(new Timestamp(d.getTime()));
if(appt.getDate().before(new Timestamp(System.currentTimeMillis()))){
msg = "ERROR: The scheduled date of this appointment has already passed.";
}
else {
ApptRequestBean req = new ApptRequestBean();
req.setRequestedAppt(appt);
msg = action.addApptRequest(req);
if (msg.contains("conflicts")) {
msg = "ERROR: " + msg;
frmt = new SimpleDateFormat("MM/dd/yyyy hh:mm a");
List<ApptBean> open = action.getNextAvailableAppts(3, appt);
prompt="<br/>The following nearby time slots are available:<br/>";
int index = 0;
for(ApptBean possible : open) {
index++;
String newDate = frmt.format(possible.getDate());
prompt += "<div style='padding:5px;margin:5px;float:left;border:1px solid black;'><b>Option ";
prompt += index+ "</b><br/>"+ frmt.format(possible.getDate());
prompt +="<form action='appointmentRequests.jsp' method='post'>"
+"<input type='hidden' name='lhcp' value='"+hcpid+"'/>"
+"<input type='hidden' name='apptType' value='"+apptType+"'/> "
+"<input type='hidden' name='startDate' value='"+newDate.substring(0,10)+"'/>"
+"<input type='hidden' name='time1' value='"+newDate.substring(11,13)+"'/>"
+"<input type='hidden' name='time2' value='"+newDate.substring(14,16)+"'/>"
+"<input type='hidden' name='time3' value='"+newDate.substring(17)+"'/>"
+"<input type='hidden' name='comment' value='"+comment+"'/>"
+"<input type='submit' name='request' value='Select this time'/>"
+"</form></div>";
}
prompt+="<div style='clear:both;'><br/></div>";
} else {
loggingAction.logEvent(
TransactionType.APPOINTMENT_REQUEST_SUBMITTED,
loggedInMID, hcpid, "");
}
}
} else {
msg = "ERROR: Date must by in the format: MM/dd/yyyy";
}
} catch (ParseException e) {
msg = "ERROR: Date must by in the format: MM/dd/yyyy";
}
}
}
%>
<h1>Request a New Appointment</h1>
<%
if (msg.contains("ERROR")) {
%>
<span class="iTrustError"><%=msg%></span>
<%
} else {
%>
<span class="iTrustMessage"><%=msg%></span>
<%
}
%>
<%=prompt%>
<%
Date d = new Date(original.getDate().getTime());
DateFormat format = new SimpleDateFormat("MM/dd/yyyy hh:mm a");
%>
<form id="mainForm" type="hidden" method="post" action="editApptPatient.jsp?apt=<%=aptParameter %>&apptID=<%=original.getApptID() %>">
<p>HCP:</p>
<select name="lhcp">
<%
for(HCPVisitBean visit : visits){
if (visit.getHCPMID() == original.getHcp()){
%>
<option selected="selected" value="<%=visit.getHCPMID()%>"><%=visit.getHCPName()%></option>
<%
} else {
%>
<option value="<%=visit.getHCPMID()%>"><%=visit.getHCPName()%></option>
<%
}
}
%>
</select>
<p>Appointment Type:</p>
<select name="apptType">
<%
for (ApptTypeBean appt : apptTypes) {
if (appt.getName().equals(original.getApptType())) {
%>
<option selected="selected" value="<%=appt.getName()%>"><%=appt.getName()%></option>
<%
} else {
%>
<option value="<%=appt.getName()%>"><%=appt.getName()%></option>
<%
}
}
String startDate = "";
%>
</select>
<p>Date:</p>
<%DateFormat format_1 = new SimpleDateFormat("MM/dd/yyyy");%>
<input name="startDate" value="<%=StringEscapeUtils.escapeHtml("" + ( format_1.format(d) )) %>">
<input type=button value="Select Date" onclick="displayDatePicker('startDate');">
<p>Time:</p>
<%DateFormat format_hour = new SimpleDateFormat("hh");%>
<%DateFormat format_minute = new SimpleDateFormat("mm");%>
<%DateFormat format_ampm = new SimpleDateFormat("a");%>
<select name="time1">
<%
String hour = "";
for (int i = 1; i <= 12; i++) {
if (i < 10)
hour = "0" + i;
else
hour = i + "";
if (hour.equals((format_hour.format(d) ))) {
%>
<option selected="selected" value="<%=hour%>"><%=StringEscapeUtils.escapeHtml("" + (hour))%></option>
<%
} else {
%>
<option value="<%=hour%>"><%=StringEscapeUtils.escapeHtml("" + (hour))%></option>
<%
}
}
%>
</select>:<select name="time2">
<%
String min = "";
for (int i = 0; i < 60; i += 5) {
if (i < 10)
min = "0" + i;
else
min = i + "";
if (min.equals((format_minute.format(d) ))) {
%>
<option selected="selected" value="<%=min%>"><%=StringEscapeUtils.escapeHtml("" + (min))%></option>
<%
} else {
%>
<option value="<%=min%>"><%=StringEscapeUtils.escapeHtml("" + (min))%></option>
<%
}
}
%>
</select> <select name="time3">
<%
if (format_ampm.format(d).equals("AM")){
%>
<option value="PM">PM</option>
<option selected="selected" value="AM">AM</option>
<%
} else {
%>
<option value="AM">AM</option>
<option selected="selected" value="PM">PM</option>
<%
}
%>
</select>
<p>Comment:</p>
<textarea name="comment" cols="100" rows="5"><%=StringEscapeUtils.escapeHtml("" + (comment))%></textarea>
<br />
<br />
<input type="hidden" id="editAppt" name="editAppt" value=""/>
<input type="submit" name="request" value="Request" onClick="document.getElementById('editAppt').value='Request'"/>
</form>
<%@include file="/footer.jsp"%>
......@@ -66,7 +66,7 @@
<div class="panel-body" id="appt-menu">
<ul class="nav nav-sidebar">
<li><a href="/iTrust/auth/patient/appointmentRequests.jsp">Appointment Requests</a>
<li><a href="/iTrust/auth/patient/viewMyAppts.jsp">View My Appointments</a>
<li><a href="/iTrust/auth/patient/viewMyApptsPatient.jsp">View/Edit My Appointments</a>
</ul>
</div>
</div>
......
<%@page errorPage="/auth/exceptionHandler.jsp"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.sql.Timestamp"%>
<%@page import="edu.ncsu.csc.itrust.action.EditApptTypeAction"%>
<%@page import="edu.ncsu.csc.itrust.action.ViewMyApptsAction"%>
<%@page import="edu.ncsu.csc.itrust.beans.ApptBean"%>
<%@page import="edu.ncsu.csc.itrust.dao.mysql.ApptTypeDAO"%>
<%@page import="edu.ncsu.csc.itrust.dao.DAOFactory"%>
<%@include file="/global.jsp" %>
<%
pageTitle = "iTrust - View My Messages";
%>
<%@include file="/header.jsp" %>
<div align=center>
<h2>My Appointments</h2>
<%
loggingAction.logEvent(TransactionType.APPOINTMENT_ALL_VIEW, loggedInMID.longValue(), 0, "");
ViewMyApptsAction action = new ViewMyApptsAction(prodDAO, loggedInMID.longValue());
ApptTypeDAO apptTypeDAO = prodDAO.getApptTypeDAO();
List<ApptBean> appts = action.getMyAppointments();
session.setAttribute("appts", appts);
if (appts.size() > 0) { %>
<table class="fTable">
<tr style="width:100%">
<th>HCP</th>
<th>Appointment Type</th>
<th>Appointment Date/Time</th>
<th>Duration</th>
<th>Comments</th>
<th>Change</th>
<th></th>
<th></th>
</tr>
<%
List<ApptBean>conflicts = action.getAllConflicts(loggedInMID.longValue());
int index = 0;
for(ApptBean a : appts) {
String comment = "No Comment";
if(a.getComment() != null)
comment = "<a href='viewAppt.jsp?apt="+a.getApptID()+"'>Read Comment</a>";
Date d = new Date(a.getDate().getTime());
Date now = new Date();
DateFormat format = new SimpleDateFormat("MM/dd/yyyy hh:mm a");
String row = "<tr";
if(conflicts.contains(a))
row += " style='font-weight: bold;'";
%>
<%=row+" "+((index%2 == 1)?"class=\"alt\"":"")+">"%>
<td><%= StringEscapeUtils.escapeHtml("" + ( action.getName(a.getHcp()) )) %></td>
<td><%= StringEscapeUtils.escapeHtml("" + ( a.getApptType() )) %></td>
<td><%= StringEscapeUtils.escapeHtml("" + ( format.format(d) )) %></td>
<td><%= StringEscapeUtils.escapeHtml("" + ( apptTypeDAO.getApptType(a.getApptType()).getDuration()+" minutes" )) %></td>
<td><%= comment %></td>
<td style="text-align:center;"><% if(d.after(now)){ %><a href="editApptPatient.jsp?apt=<%=a.getApptID() %>">Edit</a> <% } %></td>
<td style="text-align:center;">|</td>
<td style="text-align:center;"><% if(d.after(now)){ %><a href="cancelApptPatient.jsp?apt=<%=a.getApptID() %>">Cancel Appointment</a><%}%></td>
</tr>
<%
index ++;
}
%>
</table>
<% } else { %>
<div>
<i>You have no Appointments</i>
</div>
<% } %>
<br />
</div>
<%@include file="/footer.jsp" %>
......@@ -115,6 +115,9 @@
{
if (userRole.equals("patient")) {
%><%@include file="/auth/patient/menu.jsp"%>
<%
} else if (userRole.equals("preRegisteredPatient")) {
%><%@include file="/auth/preRegisteredPatient/menu.jsp"%>
<%
} else if (userRole.equals("uap")) {
%><%@include file="/auth/uap/menu.jsp"%>
......
......@@ -41,9 +41,9 @@ function fillLoginFields(u,p) {
<input type="submit" value="Login">
<br /><br />
<a style="font-size: 80%;" href="/iTrust/util/resetPassword.jsp">Reset Password</a>
<a> </a>
<a style="font-size: 80%;" href="/iTrust/util/PreRegisterPatient.jsp" id="preregister_link">Pre-Register</a>
<a style="font-size: 80%;margin-right: 2.5em;" href="/iTrust/util/resetPassword.jsp">Reset Password</a>
<a> &nbsp</a>
<a style="font-size: 80%;margin-left: 3em;" href="/iTrust/util/PreRegisterPatient.jsp" id="preregister_link">Pre-Register</a>
</form>
<%
......@@ -62,9 +62,9 @@ function fillLoginFields(u,p) {
%>
<input type="submit" value="Login"><br /><br />
<a style="font-size: 80%;" href="/iTrust/util/resetPassword.jsp">Reset Password</a>
<a style="font-size: 80%;margin-right: 2.5em;" href="/iTrust/util/resetPassword.jsp">Reset Password</a>
<a> </a>
<a style="font-size: 80%;" href="/iTrust/util/PreRegisterPatient.jsp">Pre-Register</a>
<a style="font-size: 80%;margin-left: 3em;" href="/iTrust/util/PreRegisterPatient.jsp">Pre-Register</a>
</form>
<%
......
......@@ -4,6 +4,7 @@
<%@page import="edu.ncsu.csc.itrust.action.AddPreRegisteredPatientAction"%>
<%@page import="edu.ncsu.csc.itrust.BeanBuilder"%>
<%@page import="edu.ncsu.csc.itrust.beans.PatientBean"%>
<%@page import="edu.ncsu.csc.itrust.beans.forms.HealthRecordForm"%>
<%@page import="edu.ncsu.csc.itrust.exception.FormValidationException"%>
<%@page import="edu.ncsu.csc.itrust.exception.ITrustException"%>
......@@ -21,62 +22,66 @@ boolean formIsFilled = request.getParameter("formIsFilled") != null && request.g
if (formIsFilled) {
//This page is not actually a "page", it just adds a user and forwards.
PatientBean p = new BeanBuilder<PatientBean>().build(request.getParameterMap(), new PatientBean());
try {
long newMID = 021700L;
newMID = new AddPreRegisteredPatientAction(DAOFactory.getProductionInstance(), newMID).addPatient(p);
session.setAttribute("pid", Long.toString(newMID));
String fullname;
String password;
password = p.getPassword();
fullname = p.getFullName();
PatientBean p = new BeanBuilder<PatientBean>().build(request.getParameterMap(), new PatientBean());
HealthRecordForm h = new BeanBuilder<HealthRecordForm>().build(request.getParameterMap(), new HealthRecordForm());
String pwd = request.getParameter("password");
String VerifyPwd = request.getParameter("verifyPassword");
if (pwd.equals(VerifyPwd)){
loggingAction.logEvent(TransactionType.PATIENT_CREATE, newMID, newMID, "");
try{
long newMID = 021700L;
newMID = new AddPreRegisteredPatientAction(DAOFactory.getProductionInstance(), newMID).addPatient(p, h);
session.setAttribute("pid", Long.toString(newMID));
String fullname;
String password;
password = p.getPassword();
fullname = p.getFullName();
loggingAction.logEvent(TransactionType.PATIENT_CREATE, newMID, newMID, "");
%>
<div align=center>
<span class="iTrustMessage">New Pre-registered Prepatient <%= StringEscapeUtils.escapeHtml("" + (fullname)) %> successfully added!</span>
<br /><br />
<table class="fTable">
<tr>
<th colspan=2>New Pre-registered Patient Information</th>
</tr>
<tr>
<td class="subHeaderVertical">MID:</td>
<td><%= StringEscapeUtils.escapeHtml("" + (newMID)) %></td>
<td></td>
</tr>
<tr>
<td class="subHeaderVertical">Temporary Password:</td>
<td><%= StringEscapeUtils.escapeHtml("" + (password)) %></td>
<td></td>
</tr>
</table>
<br />Please get this information to <b><%= StringEscapeUtils.escapeHtml("" + (fullname)) %></b>!
</div>
<div align=center>
<span class="iTrustMessage">New Pre-registered Prepatient <%= StringEscapeUtils.escapeHtml("" + (fullname)) %> successfully added!</span>
<br /><br />
<table class="fTable">
<tr>
<th colspan="2">New Pre-registered Patient Information</th>
</tr>
<tr>
<td class="subHeaderVertical">MID:</td>
<td id="newMID"><%= StringEscapeUtils.escapeHtml("" + (newMID)) %></td>
</tr>
</table>
<br />Please get this information to <b><%= StringEscapeUtils.escapeHtml("" + (fullname)) %></b>
</div>
<%
} catch(FormValidationException e){
} catch(FormValidationException e) {
%>
<div align=center>
<span class="iTrustError"> <%= StringEscapeUtils.escapeHtml(e.getMessage()) %></span>
<!-- StringEscapeUtils.escapeHtml(e.getMessage()) -->
</div>
<div align=center>
<span class="iTrustError"> <%= StringEscapeUtils.escapeHtml(e.getMessage()) %></span>
<!-- StringEscapeUtils.escapeHtml(e.getMessage()) -->
</div>
<%
} catch (ITrustException e) {
} catch (ITrustException ex) {
%>
<div align=center>
<span class="iTrustError"> <%= StringEscapeUtils.escapeHtml(e.getMessage()) %></span>
<!-- StringEscapeUtils.escapeHtml(e.getMessage()) -->
</div>
<div align=center>
<span class="iTrustError"> <%= StringEscapeUtils.escapeHtml(ex.getMessage()) %></span>
<!-- StringEscapeUtils.escapeHtml(ex.getMessage()) -->
</div>
<%
}
}else{
%>
<script type="text/javascript">
alert("Passwords do not match! Pre-Registration Not Successed!");
document.getElementById('submit_preregister').disabled = true;
</script>
<%
}
}
%>
......@@ -88,109 +93,129 @@ if (formIsFilled) {
<br />
<div style="width: 50%; text-align:left;">Please enter in the name of the Pre-registered
patient, with a valid email address. If the user does not have an email
address, use the hospital's email address, [insert pre-defined email],
address, use the hospital&#39;s email address, [insert pre-defined email],
to recover the password.</div>
<br />
<br />
<table class="fTable">
<tr>
<th colspan=2 style="text-align:center">Pre-registered Patient Information</th>
</tr>
<tr>
<td class="subHeaderVertical">First name:</td>
<td><input type="text" name="firstName" required> *</td>
</tr>
<tr>
<td class="subHeaderVertical">Last Name:</td>
<td><input type="text" name="lastName" required> *</td>>
</tr>
<tr>
<td class="subHeaderVertical">Email:</td>
<td><input type="text" name="email" required> *</td>
</tr>
<tr>
<td class="subHeaderVertical">Password:</td>
<td><input type="password" name="password" required> *</td>
</tr>
<tr>
<td class="subHeaderVertical">Verify Password:</td>
<td><input type="password" name="verifyPassword" required> *</td>
</tr>
<tr>
<td class="subHeaderVertical">Address:</td>
<td> <input name="streetAddress1" type="text"><br />
<input name="streetAddress2" type="text"></td>
</tr>
<tr>
<td class="subHeaderVertical">City:</td>
<td> <input name="city" type="text"></td>
</tr>
<tr>
<td class="subHeaderVertical">State:</td>
<td><itrust:state name="state" value="AK" /></td>
</tr>
<tr>
<td class="subHeaderVertical">Zip:</td>
<td> <input type="text" name="zip" maxlength="10" size="10"></td>
</tr>
<tr>
<td class="subHeaderVertical">Phone:</td>
<td> <input type="text" name="phone" size="12" maxlength="12"></td>
</tr>
<tr>
<td class="subHeaderVertical">Height:</td>
<td><input type="text" name="height"></td>
</tr>
<tr>
<td class="subHeaderVertical">Weight:</td>
<td><input type="text" name="weight"></td>
</tr>
<tr>
<td class="subHeaderVertical">Smoker:</td>
<td><input type="radio" id="smoker_yes" name="isSmoker" value="true">
<tr>
<th colspan=3 style="text-align:center">Pre-registered Patient Information</th>
</tr>
<tr>
<td class="subHeaderVertical">First name:</td>
<td><input type="text" name="firstName" required></td>
<td style="font-size: 16pt; text-align:left; color:red">*</td>
</tr>
<tr>
<td class="subHeaderVertical">Last Name:</td>
<td><input type="text" name="lastName" required></td>
<td style="font-size: 16pt; text-align:left; color:red">*</td>
</tr>
<tr>
<td class="subHeaderVertical">Email:</td>
<td><input type="text" name="email" required></td>
<td style="font-size: 16pt; text-align:left; color:red">*</td>
</tr>
<tr>
<td class="subHeaderVertical">Password:</td>
<td><input type="password" name="password" id ="password" required></td>
<td style="font-size: 16pt; text-align:left; color:red">*</td>
</tr>
<tr>
<td class="subHeaderVertical">Verify Password:</td>
<td><input type="password" name="verifyPassword" id = "verifyPassword" required></td>
<td style="font-size: 16pt; text-align:left; color:red">*</td>
</tr>
<tr>
<td class="subHeaderVertical">Address:</td>
<td> <input name="streetAddress1" type="text"><br />
<input name="streetAddress2" type="text"></td>
<td> </td>
</tr>
<tr>
<td class="subHeaderVertical">City:</td>
<td> <input name="city" type="text"></td>
<td> </td>
</tr>
<tr>
<td class="subHeaderVertical">State:</td>
<td><itrust:state name="state" value="AK" /></td>
<td> </td>
</tr>
<tr>
<td class="subHeaderVertical">Zip:</td>
<td> <input type="text" name="zip" maxlength="10" size="10"></td>
<td> </td>
</tr>
<tr>
<td class="subHeaderVertical">Phone:</td>
<td> <input type="text" name="phone" size="12" maxlength="12"></td>
<td> </td>
</tr>
<tr>
<td class="subHeaderVertical">Height:</td>
<td><input type="text" name="height"></td>
<td> </td>
</tr>
<tr>
<td class="subHeaderVertical">Weight:</td>
<td><input type="text" name="weight"></td>
<td> </td>
</tr>
<tr>
<td class="subHeaderVertical">Smoker:</td>
<td><input type="radio" id="smoker_yes" name="isSmoker" value="1">
<label for="smoker_yes">Yes</label>
<br>
<input type="radio" id="smoker_no" name="isSmoker" value="false">
<label for="smoker_no">No</label><br>
<br />
<input type="radio" id="smoker_no" name="isSmoker" value="0" checked">
<label for="smoker_no">No</label><br />
</td>
</tr>
<br/>
<tr>
<th colspan=2 style="text-align:center">Insurance Information</th>
</tr>
<tr>
<td class="subHeaderVertical">Insurance Provider Name:</td>
<td> <input type="text" name="icName"></td>
</tr>
<tr>
<td class="subHeaderVertical">Insurance Provider Address:</td>
<td><input name="icAddress1" type="text"><br />
<input name="icAddress2" type="text"></td>
</tr>
<tr>
<td class="subHeaderVertical">City:</td>
<td> <input name="icCity" type="text"></td>
</tr>
<tr>
<td class="subHeaderVertical">State:</td>
<td><itrust:state name="icState" value="AK" /></td>
</tr>
<tr>
<td class="subHeaderVertical">Zip:</td>
<td> <input type="text" name="icZip" maxlength="10" size="10"></td>
</tr>
<tr>
<td class="subHeaderVertical">Insurance Provider Phone:</td>
<td><input type="text" name="icPhone"></td>
</tr>
<td> </td>
</tr>
<br/>
<tr>
<th colspan=3 style="text-align:center">Insurance Information</th>
</tr>
<tr>
<td class="subHeaderVertical">Insurance Provider Name:</td>
<td> <input type="text" name="icName"></td>
<td> </td>
</tr>
<tr>
<td class="subHeaderVertical">Insurance Provider Address:</td>
<td><input name="icAddress1" type="text"><br />
<input name="icAddress2" type="text"></td>
<td> </td>
</tr>
<tr>
<td class="subHeaderVertical">City:</td>
<td> <input name="icCity" type="text"></td>
<td> </td>
</tr>
<tr>
<td class="subHeaderVertical">State:</td>
<td><itrust:state name="icState" value="AK" /></td>
<td> </td>
</tr>
<tr>
<td class="subHeaderVertical">Zip:</td>
<td> <input type="text" name="icZip" maxlength="10" size="10"></td>
<td> </td>
</tr>
<tr>
<td class="subHeaderVertical">Insurance Provider Phone:</td>
<td><input type="text" name="icPhone"></td>
<td> </td>
</tr>
</table>
<br />
<input type="submit" style="font-size: 16pt; font-weight: bold;" value="Patient Pre-Register" id="submit_preregister">
</form>
<br />
</div>
<%@include file="/footer.jsp" %>
DELETE FROM users WHERE MID = 81;
DELETE FROM officevisits WHERE PatientID = 81;
DELETE FROM patients WHERE MID = 81;
INSERT INTO users(MID, password, role, sQuestion, sAnswer)
VALUES (81, '30c952fab122c3f9759f02a6d95c3758b246b4fee239957b2d4fee46e26170c4', 'patient', 'what is your favorite color?', 'blue')
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO patients (MID, Gender, DateOfDeath, CauseOfDeath)
VALUES (81,'Male','2019-07-01',84.50)
ON DUPLICATE KEY UPDATE MID = MID;
INSERT INTO officevisits(id,visitDate,HCPID,notes,HospitalID,PatientID)
VALUES (20771,'2019-07-01',9000000000,'died','1',81)
ON DUPLICATE KEY UPDATE id = id;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment