示例#1
0
 public boolean getPatientMedicalTestComponents(PatientDTO dto) throws Exception {
   List<PatientMedicalTestComponent> patientMedicalTestComponents =
       appDAO.findPatientMedicalTestComponentByTestId(dto.getPatientMedicalTestId());
   dto.setPatientMedicalTestComponents(patientMedicalTestComponents);
   activityLogService.logViewPatient(
       dto.getId(), null, dto.getId(), "GetPatientMedicalTestComponents");
   return true;
 }
示例#2
0
 public void createPassword(PatientDTO dto) throws Exception {
   Patient patient = appDAO.findPatientById(dto.getId());
   String newSalt = UUID.randomUUID().toString();
   String encodedPassword = OneWayPasswordEncoder.getInstance().encode(dto.getPassword(), newSalt);
   patient.getCred().setPassword(encodedPassword);
   appDAO.update(patient.getCred());
 }
示例#3
0
 public List<PatientLetter> getPatientLetters(PatientDTO dto) throws Exception {
   Patient patient = appDAO.findPatientById(dto.getId());
   activityLogService.logViewPatient(patient.getId(), null, patient.getId(), "GetPatientLetters");
   List<PatientLetter> letters = appDAO.getPatientLetters(patient);
   for (PatientLetter pl : letters) {
     decrypt(pl.getPatient());
   }
   return letters;
 }
示例#4
0
 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;
 }
示例#5
0
 public List<PatientClinician> getPatientClinicians(PatientDTO dto) throws Exception {
   Patient patient = appDAO.findPatientById(dto.getId());
   activityLogService.logViewPatient(
       patient.getId(), null, patient.getId(), "GetPatientClinicians");
   List<PatientClinician> patientClinicians = appDAO.getPatientClinicians(patient);
   for (PatientClinician patientClinician : patientClinicians) {
     ExcludedObjects.excludeObjects(patientClinician.getPatient());
   }
   return patientClinicians;
 }
示例#6
0
 public List<PatientMessage> getPatientMessages(PatientDTO dto, Boolean fromClinician)
     throws Exception {
   Patient patient = appDAO.findPatientById(dto.getId());
   activityLogService.logViewPatient(patient.getId(), null, patient.getId(), "GetPatientMessages");
   List<PatientMessage> messages = appDAO.getPatientMessages(patient, fromClinician);
   for (PatientMessage pm : messages) {
     decrypt(pm.getPatient());
   }
   return messages;
 }
示例#7
0
 public List<PatientHealthTrendReport> getPatientHealthTrendReports(PatientDTO dto)
     throws Exception {
   Integer patientId = dto.getId();
   activityLogService.logViewPatient(patientId, null, patientId, "GetPatientHealthTrendReports");
   return appDAO.getPatientHealthTrendReports(patientId);
 }
示例#8
0
 public List<PatientMedicalProcedure> getPatientMedicalProcedures(PatientDTO dto)
     throws Exception {
   Integer patientId = dto.getId();
   activityLogService.logViewPatient(patientId, null, patientId, "GetPatientMedicalProcedures");
   return appDAO.getPatientMedicalProcedures(patientId);
 }
示例#9
0
 public List<PatientImmunization> getPatientImmunizations(PatientDTO dto) throws Exception {
   Integer patientId = dto.getId();
   activityLogService.logViewPatient(patientId, null, patientId, "GetPatientImmunizations");
   return appDAO.getPatientImmunizations(patientId);
 }
示例#10
0
 public List<PatientAllergen> getPatientAllergens(PatientDTO dto) throws Exception {
   Patient patient = appDAO.findPatientById(dto.getId());
   activityLogService.logViewPatient(
       patient.getId(), null, patient.getId(), "GetPatientAllergens");
   return appDAO.getPatientAllergens(patient);
 }