Skip to content
Snippets Groups Projects
Commit 40142a0e authored by adityab3's avatar adityab3
Browse files

Fixed null error in PreRegisterPatient.jsp

parent 25741949
No related branches found
No related tags found
1 merge request!3Uc91.1
<%@taglib prefix="itrust" uri="/WEB-INF/tags.tld"%>
<%@page errorPage="/auth/exceptionHandler.jsp"%>
<%@page import="edu.ncsu.csc.itrust.action.AddPatientAction"%>
<%@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.HealthRecord"%>
<%@page import="edu.ncsu.csc.itrust.beans.forms.HealthRecordForm"%>
<%@page import="edu.ncsu.csc.itrust.exception.FormValidationException"%>
<%@include file="/global.jsp" %>
......@@ -19,11 +19,13 @@ boolean formIsFilled = request.getParameter("formIsFilled") != null && request.g
if (formIsFilled) {
PatientBean p = new BeanBuilder<PatientBean>().build(request.getParameterMap(), new PatientBean());
HealthRecord h = new BeanBuilder<HealthRecord>().build(request.getParameterMap(), new HealthRecord());
HealthRecordForm h = new BeanBuilder<HealthRecordForm>().build(request.getParameterMap(), new HealthRecordForm());
String s = "bla";
long mid = new PreRegisterPatientAction(prodDAO).addPatient(p);
String name = "<Name>";
if (p != null) {
s = p.getFullName();
name = p.getFullName();
}
%>
<div><%=s%></div>
......
......@@ -27,8 +27,8 @@ public class AddPreRegisteredPatientAction {
* @param loggedInMID
*/
public AddPreRegisteredPatientAction(DAOFactory factory, long loggedInMID) {
this.patientDAO = factory.getPatientDAO();
this.loggedInMID = loggedInMID;
this.patientDAO = factory.getPatientDAO();
this.loggedInMID = loggedInMID;
this.authDAO = factory.getAuthDAO();
}
......
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