From 696a57e8517d453203088261dd752f7d2a6b5019 Mon Sep 17 00:00:00 2001 From: njorocs Date: Mon, 12 Aug 2024 09:49:50 +0300 Subject: [PATCH 1/2] Added Visit attribute for storing SHA benefits package, Location attribute for SHA verification status and Home visit checklist form metadata --- .../openmrs/module/kenyaemr/metadata/CommonMetadata.java | 4 +++- .../openmrs/module/kenyaemr/metadata/FacilityMetadata.java | 7 +++++++ .../org/openmrs/module/kenyaemr/metadata/HivMetadata.java | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/metadata/CommonMetadata.java b/api/src/main/java/org/openmrs/module/kenyaemr/metadata/CommonMetadata.java index de83949628..f47d359e7d 100755 --- a/api/src/main/java/org/openmrs/module/kenyaemr/metadata/CommonMetadata.java +++ b/api/src/main/java/org/openmrs/module/kenyaemr/metadata/CommonMetadata.java @@ -192,6 +192,7 @@ public static final class _VisitAttributeType { public static final String PAYMENT_METHOD_UUID = "e6cb0c3b-04b0-4117-9bc6-ce24adbda802"; public static final String POLICY_NUMBER = "0f4f3306-f01b-43c6-af5b-fdb60015cb02"; public static final String INSURANCE_SCHEME = "2d0fa959-6780-41f1-85b1-402045935068"; + public static final String SHA_BENEFITS_PACKAGE = "338725fa-3790-4679-98b9-be623214ee29"; } public static final class _VisitType { @@ -447,7 +448,8 @@ public void install() { install(visitAttributeType("Payment Method", "The payment method used by the patient to settle payment", FreeTextDatatype.class, null, 0, 1, _VisitAttributeType.PAYMENT_METHOD_UUID)); install(visitAttributeType("Policy Number", "The insurance policy number or member number", FreeTextDatatype.class, null, 0, 1, _VisitAttributeType.POLICY_NUMBER)); install(visitAttributeType("Insurance scheme", "The insurance scheme the patient is using to settle payment for services e.g. NHIF, Old mutual.", FreeTextDatatype.class, null, 0, 1, _VisitAttributeType.INSURANCE_SCHEME)); - + install(visitAttributeType("SHA Benefits Package", "SHA benefits package the patient is entitled to", FreeTextDatatype.class, null, 0, 1, _VisitAttributeType.SHA_BENEFITS_PACKAGE)); + install(visitType("Outpatient", "Visit where the patient is not admitted to the hospital", _VisitType.OUTPATIENT)); install(visitType("Inpatient", "Visit where the patient is admitted to the hospital", _VisitType.INPATIENT)); uninstall(possible(PersonAttributeType.class, "73d34479-2f9e-4de3-a5e6-1f79a17459bb"), "Became patient identifier"); // National ID attribute type diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/metadata/FacilityMetadata.java b/api/src/main/java/org/openmrs/module/kenyaemr/metadata/FacilityMetadata.java index bcf4650490..b233e06b4a 100755 --- a/api/src/main/java/org/openmrs/module/kenyaemr/metadata/FacilityMetadata.java +++ b/api/src/main/java/org/openmrs/module/kenyaemr/metadata/FacilityMetadata.java @@ -45,6 +45,7 @@ public static final class _LocationAttributeType { public static final String TELEPHONE_LANDLINE = "4ecb5b3f-1518-4056-a266-c4da1def45f5"; public static final String TELEPHONE_MOBILE = "8760f471-b2bb-4ded-8970-badf95d3bb44"; public static final String TELEPHONE_FAX = "29e1e758-d03e-4e84-a55e-288fa63d533a"; + public static final String SHA_ACCREDITATION = "7dbbfe5d-8a5a-4b24-897d-0cc5299c3dbb"; } /** @@ -92,6 +93,12 @@ public void install(boolean full) throws Exception { _LocationAttributeType.TELEPHONE_FAX )); + install(locationAttributeType( + "SHA Accredited Facility", "SHA accredited verification status", + FreeTextDatatype.class, "", 0, 1, + _LocationAttributeType.SHA_ACCREDITATION + )); + if (full) { ObjectSource source = new LocationMflCsvSource("metadata/mfl_2014-05-12.csv"); sync(source, mflSynchronization); diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/metadata/HivMetadata.java b/api/src/main/java/org/openmrs/module/kenyaemr/metadata/HivMetadata.java index 565cfe69a8..660b5a141c 100755 --- a/api/src/main/java/org/openmrs/module/kenyaemr/metadata/HivMetadata.java +++ b/api/src/main/java/org/openmrs/module/kenyaemr/metadata/HivMetadata.java @@ -49,6 +49,7 @@ public static final class _EncounterType { public static final String ENHANCED_ADHERENCE = "54df6991-13de-4efc-a1a9-2d5ac1b72ff8"; public static final String ART_PREPARATION = "ec2a91e5-444a-4ca0-87f1-f71ddfaf57eb"; public static final String HIGH_IIT_INTERVENTION = "84d66c25-e2bd-48a2-8686-c1652eb9d283"; + public static final String HOME_VISIT_CHECKLIST = "4224f8bf-11b2-4e47-a958-1dbdfd7fa41d"; @@ -73,6 +74,7 @@ public static final class _Form { public static final String CCC_DEFAULTER_TRACING = "a1a62d1e-2def-11e9-b210-d663bd873d93"; public static final String LAB_ORDERS_FORM_UUID = "2cdeded1-3f69-3bda-beff-1ed2ead94eaf"; public static final String HIGH_IIT_INTERVENTION = "6817d322-f938-4f38-8ccf-caa6fa7a499f"; + public static final String HOME_VISIT_CHECKLIST = "d86a77bd-769a-47ec-942a-716afbd907cc"; } @@ -108,6 +110,7 @@ public void install() { install(encounterType("Enhanced Adherence Screening", "Enhanced Adherence Screening", _EncounterType.ENHANCED_ADHERENCE)); install(encounterType("Gender Based Violence Screening", "Gender Based Violence Screening", _EncounterType.GENDER_BASED_VIOLENCE)); install(encounterType("High IIT Intervention", "High IIT Intervention", _EncounterType.HIGH_IIT_INTERVENTION)); + install(encounterType("Home Visit Checklist", "Home Visit Checklist", _EncounterType.HOME_VISIT_CHECKLIST)); install(form("HIV Enrollment", null, _EncounterType.HIV_ENROLLMENT, "1", _Form.HIV_ENROLLMENT)); install(form("Clinical Encounter - HIV addendum", null, _EncounterType.HIV_CONSULTATION, "1", _Form.CLINICAL_ENCOUNTER_HIV_ADDENDUM)); @@ -127,6 +130,7 @@ public void install() { install(form("CCC Defaulter Tracing", "Defaulter Tracing Form", _EncounterType.CCC_DEFAULTER_TRACING, "1", _Form.CCC_DEFAULTER_TRACING)); install(form("Laboratory Test Orders", "Laboratory Test Orders", _EncounterType.LAB_ORDER, "1", _Form.LAB_ORDERS_FORM_UUID)); install(form("High IIT Intervention", "High IIT Intervention", _EncounterType.HIGH_IIT_INTERVENTION, "1", _Form.HIGH_IIT_INTERVENTION)); + install(form("Home Visit Checklist", "Home Visit Checklist", _EncounterType.HOME_VISIT_CHECKLIST, "1", _Form.HOME_VISIT_CHECKLIST)); install(patientIdentifierType("KDoD number", "Unique Id for KDoD patient", "(?i)^(KDOD)+[0-9]{4,5}$", "Must start with KDoD followed by 4-5 digit number. Example: KDoD12345 or kdod1233", null, LocationBehavior.NOT_USED, false, _PatientIdentifierType.KDoD_NUMBER)); From f47a4602693c992bf1afed78821fe62ffc0afe66 Mon Sep 17 00:00:00 2001 From: njorocs Date: Mon, 12 Aug 2024 10:45:33 +0300 Subject: [PATCH 2/2] Installing SHA Accreditation attribute using basic non-csv method --- .../module/kenyaemr/metadata/FacilityMetadata.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/kenyaemr/metadata/FacilityMetadata.java b/api/src/main/java/org/openmrs/module/kenyaemr/metadata/FacilityMetadata.java index b233e06b4a..d4e50b22ee 100755 --- a/api/src/main/java/org/openmrs/module/kenyaemr/metadata/FacilityMetadata.java +++ b/api/src/main/java/org/openmrs/module/kenyaemr/metadata/FacilityMetadata.java @@ -61,6 +61,11 @@ public void install() throws Exception { } else { System.out.println("Skipping refreshing of the facility list ..."); } + install(locationAttributeType( + "SHA Accredited Facility", "SHA accredited verification status", + FreeTextDatatype.class, "", 0, 1, + _LocationAttributeType.SHA_ACCREDITATION + )); } /** @@ -93,12 +98,6 @@ public void install(boolean full) throws Exception { _LocationAttributeType.TELEPHONE_FAX )); - install(locationAttributeType( - "SHA Accredited Facility", "SHA accredited verification status", - FreeTextDatatype.class, "", 0, 1, - _LocationAttributeType.SHA_ACCREDITATION - )); - if (full) { ObjectSource source = new LocationMflCsvSource("metadata/mfl_2014-05-12.csv"); sync(source, mflSynchronization);