public String showMedicalHistory() throws Exception {
   client = ClientDao.getClientById(getId());
   medicalHistory = MedicalHistoryDao.getMedicalHistoryByClientId(client.getId());
   visitsList = VisitDao.getVisitsListByMedicalHistoryId(medicalHistory.getId());
   for (Visit visit : visitsList) {
     Order order = OrderDao.getOrderById(visit.getOrderId());
     Doctor doctor = DoctorDao.getDoctorById(order.getDoctorId());
     visit.setDoctorFullname(doctor.getFullname());
     visit.setDoctorSpeciality(doctor.getSpeciality());
     visit.setDate(UnixTimeConverter.convertUnixTimeToTime(order.getDate(), "yyyy-MM-dd"));
   }
   return Action.SUCCESS;
 }
Ejemplo n.º 2
0
 @Test
 public void addDoctor() throws Exception {
   DoctorDao.addOrUpdateDoctor(doctor);
 }
Ejemplo n.º 3
0
 @Test
 public void getDoctorList() throws Exception {
   assertNotNull(DoctorDao.getDoctorsList());
 }
Ejemplo n.º 4
0
 @Test
 public void deleteDoctor() throws Exception {
   DoctorDao.deleteDoctor(id);
 }