From 9aa0b814a3e201548e3094488bf12922fe7653e2 Mon Sep 17 00:00:00 2001 From: Barry Levine Date: Thu, 5 Mar 2020 15:50:30 -0800 Subject: [PATCH] fix text messaging --- .../patientlist/advice/DoctorRequestedAfterSaveAdvise.java | 2 +- .../page/controller/EnterPersonnelInfoPageController.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/omod/src/main/java/org/openmrs/module/patientlist/advice/DoctorRequestedAfterSaveAdvise.java b/omod/src/main/java/org/openmrs/module/patientlist/advice/DoctorRequestedAfterSaveAdvise.java index ac42dc5..cc45cf3 100644 --- a/omod/src/main/java/org/openmrs/module/patientlist/advice/DoctorRequestedAfterSaveAdvise.java +++ b/omod/src/main/java/org/openmrs/module/patientlist/advice/DoctorRequestedAfterSaveAdvise.java @@ -45,7 +45,7 @@ public void afterReturning(Object returnValue, Method method, Object[] args, Obj String message = "A Fortitudo patient has just requested your assistance"; try { - //sendAwsSms(telNo, message); + sendAwsSms(telNo, message); } catch (Exception e) { System.out.println("There was an error sending the sms message:"); diff --git a/omod/src/main/java/org/openmrs/module/patientlist/page/controller/EnterPersonnelInfoPageController.java b/omod/src/main/java/org/openmrs/module/patientlist/page/controller/EnterPersonnelInfoPageController.java index ffc78b3..2d13c71 100644 --- a/omod/src/main/java/org/openmrs/module/patientlist/page/controller/EnterPersonnelInfoPageController.java +++ b/omod/src/main/java/org/openmrs/module/patientlist/page/controller/EnterPersonnelInfoPageController.java @@ -51,6 +51,10 @@ public void controller(HttpServletRequest request, PageModel model, HttpSession } } */ + if (user.getRetired() || user.getPerson().isPersonVoided() || user.getPerson().isVoided() + || user.getPerson().getVoided()) { + continue; + } personId = user.getPerson().getPersonId(); List pp = Context.getService(PersonCountriesService.class).getPersonCountriesForPerson( user.getPerson().getPersonId());