From 56aae33f1b462a55738317d99cf3c10c5c189a28 Mon Sep 17 00:00:00 2001 From: xuechen5 <xuechen5@illinois.edu> Date: Sat, 21 Nov 2020 18:47:12 -0600 Subject: [PATCH] Merge 2 functions into 1 --- .../ViewPreRegisteredPatientListAction.java | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/iTrust/src/edu/ncsu/csc/itrust/action/ViewPreRegisteredPatientListAction.java b/iTrust/src/edu/ncsu/csc/itrust/action/ViewPreRegisteredPatientListAction.java index d85c158..74db4e4 100644 --- a/iTrust/src/edu/ncsu/csc/itrust/action/ViewPreRegisteredPatientListAction.java +++ b/iTrust/src/edu/ncsu/csc/itrust/action/ViewPreRegisteredPatientListAction.java @@ -47,7 +47,7 @@ public class ViewPreRegisteredPatientListAction { * * @throws ITrustException */ - private void getPreRegisteredFromPatientsTable() throws ITrustException { + public List<PatientBean> getPreRegisteredPatients() throws ITrustException { try { List<PatientBean> plist = patientDAO.getAllPreRegisteredPatients(); @@ -56,25 +56,11 @@ public class ViewPreRegisteredPatientListAction { PreRegisteredPatients.add(pb); } + + return PreRegisteredPatients; } catch (DBException dbe) { throw new ITrustException(dbe.getMessage()); } } - -/** - * Get the list of Pre-Registered patients - * - * @return the list of patients an HCP has had office visits with - * @throws DBException - */ - public List<PatientBean> getPreRegisteredPatients() throws DBException { - - try { - getPreRegisteredFromPatientsTable(); - } - catch (ITrustException ie) { - } - return PreRegisteredPatients; - } } \ No newline at end of file -- GitLab