@Test public void testGetPatientsInPatientListShouldNotReturnPatientsWithInvalidDates() { PatientList p = new PatientList(); p.setCreator(new User()); p.setName("GetPatientsTestList"); p.setSearchQuery("?encounterType=61ae96f4-6afe-4351-b6f8-cd4fc383cce1" + "&startDate=2012-01-02T00:00:0&endDate=2012-01-01T00:00:00"); List<Patient> pList = s.getPatientsInPatientList(p); assertEquals(pList.size(), 0); }
@Override public List<Patient> getPatientsInPatientList(PatientList patientList) { List<Encounter> encounters = getEncountersInPatientList(patientList); List<Patient> patients = new ArrayList<Patient>(); for (int j = 0; j < encounters.size(); j++) { if (!patients.contains(encounters.get(j).getPatient())) { patients.add(encounters.get(j).getPatient()); } } return patients; }
PatientListServiceImpl implements PatientListService { @Override public List<Patient> getPatientsInPatientList(PatientList patientList) { List<Encounter> encounters = getEncountersInPatientList(patientList); List<Patient> patients = new ArrayList<Patient>(); for (int j = 0; j < encounters.size(); j++) { if (!patients.contains(encounters.get(j).getPatient())) { patients.add(encounters.get(j).getPatient()); } } return patients; } }
PatientListServiceImpl implements PatientListService { @Override public List<Patient> getPatientsInPatientList(PatientList patientList) { List<Encounter> encounters = getEncountersInPatientList(patientList); List<Patient> patients = new ArrayList<Patient>(); for (int j = 0; j < encounters.size(); j++) { if (!patients.contains(encounters.get(j).getPatient())) { patients.add(encounters.get(j).getPatient()); } } return patients; }  }
PatientListServiceImpl implements PatientListService { @Override public List<Patient> getPatientsInPatientList(PatientList patientList) { List<Encounter> encounters = getEncountersInPatientList(patientList); List<Patient> patients = new ArrayList<Patient>(); for (int j = 0; j < encounters.size(); j++) { if (!patients.contains(encounters.get(j).getPatient())) { patients.add(encounters.get(j).getPatient()); } } return patients; }  @Override void setPatientListDAO(PatientListDAO dao); @Override PatientList savePatientList(PatientList patientList); @Override PatientList getPatientList(Integer id); @Override List<PatientList> getPatientListByName(String name); @Override PatientList getPatientListByUuid(String uuid); @Override List<PatientList> getPatientListByEncounterType(EncounterType encounterType); @Override List<PatientList> getAllPatientList(boolean includeRetired); @Override List<Encounter> getEncountersInPatientList(PatientList patientList); @Override List<Patient> getPatientsInPatientList(PatientList patientList); @Override PatientList updatePatientList(PatientList patientList); @Override void deletePatientList(PatientList patientList); @Override void onStartup(); @Override void onShutdown(); }
PatientListServiceImpl implements PatientListService { @Override public List<Patient> getPatientsInPatientList(PatientList patientList) { List<Encounter> encounters = getEncountersInPatientList(patientList); List<Patient> patients = new ArrayList<Patient>(); for (int j = 0; j < encounters.size(); j++) { if (!patients.contains(encounters.get(j).getPatient())) { patients.add(encounters.get(j).getPatient()); } } return patients; }  @Override void setPatientListDAO(PatientListDAO dao); @Override PatientList savePatientList(PatientList patientList); @Override PatientList getPatientList(Integer id); @Override List<PatientList> getPatientListByName(String name); @Override PatientList getPatientListByUuid(String uuid); @Override List<PatientList> getPatientListByEncounterType(EncounterType encounterType); @Override List<PatientList> getAllPatientList(boolean includeRetired); @Override List<Encounter> getEncountersInPatientList(PatientList patientList); @Override List<Patient> getPatientsInPatientList(PatientList patientList); @Override PatientList updatePatientList(PatientList patientList); @Override void deletePatientList(PatientList patientList); @Override void onStartup(); @Override void onShutdown();  }