From bace3a9e01da1b47bf6408e6629933abbec9939d Mon Sep 17 00:00:00 2001 From: ojwanganto Date: Wed, 17 Jul 2024 11:46:51 +0300 Subject: [PATCH] show all patient flags in 2.x based on eligibility criteria --- .../PatientUtilsFragmentController.java | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/omod/src/main/java/org/openmrs/module/kenyaemr/fragment/controller/patient/PatientUtilsFragmentController.java b/omod/src/main/java/org/openmrs/module/kenyaemr/fragment/controller/patient/PatientUtilsFragmentController.java index 8938274ca2..9e65dc7e10 100755 --- a/omod/src/main/java/org/openmrs/module/kenyaemr/fragment/controller/patient/PatientUtilsFragmentController.java +++ b/omod/src/main/java/org/openmrs/module/kenyaemr/fragment/controller/patient/PatientUtilsFragmentController.java @@ -78,27 +78,8 @@ public class PatientUtilsFragmentController { public List getFlags(@RequestParam("patientId") Integer patientId, @SpringBean CalculationManager calculationManager) { List flags = new ArrayList(); - List openFlags = Arrays.asList( - "NeedsCACXTestCalculation", - "NotVaccinatedCalculation", - "IsPregnantCalculation", - "EligibleForIliScreeningCalculation", - "EligibleForSariScreeningCalculation", - "EligibleForCholeraCalculation", - "EligibleForDysenteryCalculation", - "EligibleForMalariaCalculation", - "EligibleForHaemorrhagicCalculation", - "EligibleForChikungunyaCalculation", - "EligibleForMeaslesCalculation", - "EligibleForPoliomyelitisCalculation", - "EligibleForRiftValleyFeverCalculation" - ); // flags that don't require specific role // Gather all flag calculations that evaluate to true for (PatientFlagCalculation calc : calculationManager.getFlagCalculations()) { - if (openFlags.isEmpty() || !openFlags.contains(calc.getClass().getSimpleName())) { - // TODO: check if logged in user has the globally required role/privilege - continue; - } try { CalculationResult result = Context.getService(PatientCalculationService.class).evaluate(patientId, calc); if (result != null && (Boolean) result.getValue()) {