diff --git a/iTrust/src/edu/ncsu/csc/itrust/action/AddPreRegisteredPatientAction.java b/iTrust/src/edu/ncsu/csc/itrust/action/AddPreRegisteredPatientAction.java new file mode 100644 index 0000000000000000000000000000000000000000..50de00cf900f4f4ea01f081a3c85184d93697e74 --- /dev/null +++ b/iTrust/src/edu/ncsu/csc/itrust/action/AddPreRegisteredPatientAction.java @@ -0,0 +1,49 @@ +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; + } +}