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

Backend: added skeleton code for AddPreRegisteredPatientAction

parent 81790cd5
No related branches found
No related tags found
1 merge request!3Uc91.1
package edu.ncsu.csc.itrust.action;
import edu.ncsu.csc.itrust.RandomPassword;
import edu.ncsu.csc.itrust.beans.PatientBean;
import edu.ncsu.csc.itrust.dao.DAOFactory;
import edu.ncsu.csc.itrust.dao.mysql.PatientDAO;
import edu.ncsu.csc.itrust.dao.mysql.AuthDAO;
/**
* Used for Add Pre-registered Patient page (PreRegisterPatient.jsp). This just adds an empty patient, creates an entered password for
* that patient.
*
* Very similar to {@link AddOfficeVisitAction}
*
*
*/
public class AddPreRegisteredPatientAction {
private PatientDAO patientDAO;
private AuthDAO authDAO;
private long loggedInMID;
/**
* Just the factory and logged in MID
*
* @param factory
* @param loggedInMID
*/
public AddPreRegisteredPatientAction(DAOFactory factory, long loggedInMID) {
this.patientDAO = factory.getPatientDAO();
this.loggedInMID = loggedInMID;
this.authDAO = factory.getAuthDAO();
}
/**
* Creates a new patient, returns the new MID.
*
* @param p patient to be created
* @return the new MID of the patient
*/
public long addPatient(PatientBean p) {
// Add patient to DB
long newMID = 0L;
return newMID;
}
}
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