/** * Method used to find experts of specified specialty from hospitals that are in range * * @param hospitals The hospitals within the proximity of the user * @param specialty The expertise specified * @return A relationship between the hospitals within proximity and the personnel with the * specified expertise within them. */ public List<PersonnelBean> findExpertsForLocalHospitals( List<HospitalBean> hospitals, String specialty) { // HashMap<HospitalBean, List<PersonnelBean>> experts = new HashMap<HospitalBean, // List<PersonnelBean>>(); List<PersonnelBean> beans = new ArrayList<PersonnelBean>(); if (specialty.equalsIgnoreCase("all")) {} try { // Go through all nearby hospitals for (HospitalBean hospital : hospitals) { // Put the specified experts into a hashmap with the hospital // experts.put(hospital, personnelDAO.getPersonnelFromHospital(hospital.getHospitalID(), // specialty)); List<PersonnelBean> personnelBeans = personnelDAO.getPersonnelFromHospital(hospital.getHospitalID(), specialty); for (PersonnelBean personnelBean : personnelBeans) { beans.add(personnelBean); } } } catch (DBException e) { e.printStackTrace(); } Collections.sort(beans, new CustomComparator()); return beans; }
public boolean isDependent() { boolean isDependent = false; try { return authDAO.isDependent(pid); } catch (DBException e) { // If a DBException occurs print a stack trace and return false e.printStackTrace(); } return isDependent; }
@Test public void testApproveClaim() { subject.approveClaim(); try { b1 = init.getBillId(b1.getBillID()); } catch (DBException e) { e.printStackTrace(); fail(); } assertEquals(BillingBean.APPROVED, b1.getStatus()); }
public boolean setDependent(boolean dependency) { try { authDAO.setDependent(pid, dependency); if (dependency) patientDAO.removeAllRepresented(pid); } catch (DBException e) { // If a DBException occurs print a stack trace and return false e.printStackTrace(); return false; } return true; }