From 07e18ad15f1d550b8bab34cf5e2a70c6e65229b9 Mon Sep 17 00:00:00 2001 From: ruhanga Date: Wed, 24 Jan 2024 10:28:37 +0300 Subject: [PATCH] Prescribed medication duration measure to be 4 weeks --- .../org/openmrs/module/commonreports/sql/disbursement.sql | 5 ++++- .../commonreports/include/disbursementReportTestDataset.xml | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/api/src/main/resources/org/openmrs/module/commonreports/sql/disbursement.sql b/api/src/main/resources/org/openmrs/module/commonreports/sql/disbursement.sql index 70ea0453..5506d428 100644 --- a/api/src/main/resources/org/openmrs/module/commonreports/sql/disbursement.sql +++ b/api/src/main/resources/org/openmrs/module/commonreports/sql/disbursement.sql @@ -130,7 +130,7 @@ SELECT '80% (of registered women aged 30 to 49 years that have had their CCS screening for the first time) were VIA positive and referred' AS 'Indicator', CASE WHEN SUM(CASE - WHEN medication_table.medication_duration_in_weeks >= 3 THEN 1 + WHEN medication_table.medication_duration_in_weeks >= 4 THEN 1 ELSE 0 END) >= 0.8 * COUNT(*) THEN 'Yes' ELSE 'No' @@ -150,8 +150,11 @@ LEFT OUTER JOIN ( SELECT CASE + WHEN c.uuid LIKE '1822AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' THEN (d_o.duration / 672) WHEN c.uuid LIKE '1072AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' THEN (d_o.duration / 7) WHEN c.uuid LIKE '1073AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' THEN d_o.duration + WHEN c.uuid LIKE '1074AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' THEN (d_o.duration * 4.34524) + WHEN c.uuid LIKE '1734AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' THEN (d_o.duration * 52.1429) ELSE 0 END AS 'medication_duration_in_weeks', o.encounter_id diff --git a/api/src/test/resources/org/openmrs/module/commonreports/include/disbursementReportTestDataset.xml b/api/src/test/resources/org/openmrs/module/commonreports/include/disbursementReportTestDataset.xml index 2b7ed1d2..91cc6885 100644 --- a/api/src/test/resources/org/openmrs/module/commonreports/include/disbursementReportTestDataset.xml +++ b/api/src/test/resources/org/openmrs/module/commonreports/include/disbursementReportTestDataset.xml @@ -154,7 +154,7 @@ - - - + + +