public List<Appointment> getAllAppointmentsByPatient(Patient patient) throws Exception { List<Appointment> appointments = appDAO.getAllAppointmentsByPatient(patient); for (Appointment a : appointments) { decrypt(a.getPatient()); } return appointments; }
public List<Appointment> getAppointments(PatientDTO dto, boolean isPast) throws Exception { Patient patient = appDAO.findPatientById(dto.getId()); activityLogService.logViewPatient(patient.getId(), null, patient.getId(), "GetAppointments"); List<Appointment> appointments = appDAO.getAppointments(patient, isPast); for (Appointment a : appointments) { decrypt(a.getPatient()); } return appointments; }
public boolean getAppointment(AppointmentDTO dto) throws Exception { Appointment appointment = appDAO.findAppointmentById(dto.getId()); decrypt(appointment.getPatient()); dto.setAppointment(appointment); return true; }