From c827a0e983dd5e0fc527087d4fb39b6b222ef9cc Mon Sep 17 00:00:00 2001 From: Faith Kamau <121166087+hiqedme@users.noreply.github.com> Date: Thu, 23 May 2024 15:52:26 +0300 Subject: [PATCH 1/6] POC-155 fixed faulty contact reminders --- service/patient-reminder.service.js | 43 ++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/service/patient-reminder.service.js b/service/patient-reminder.service.js index f8aa8b0d9..7cba25adc 100755 --- a/service/patient-reminder.service.js +++ b/service/patient-reminder.service.js @@ -763,6 +763,7 @@ function getIptCompletionReminder(data) { function getFamilyTestingReminder(data) { let reminders = []; return getEncountersByEncounterType(data[0].person_uuid).then((res) => { + console.log('RES: ', res); if (res.results.length === 0) { reminders.push({ message: @@ -1100,12 +1101,46 @@ function transformZeroVl(vl) { } function getEncountersByEncounterType(patient_uuid) { - const family_testing_encounter = '975ae894-7660-4224-b777-468c2e710a2a'; - return new Promise(function (resolve, reject) { + const primaryFamilyTestingEncounter = '975ae894-7660-4224-b777-468c2e710a2a'; + const secondaryFamilyTestingEncounter = + '5a58f6f5-f5a6-47eb-a644-626abd83f83b'; + const specificConceptUuid = '0df3af2d-4eeb-4552-8395-51ef32270842'; + + function findSpecificObservation(encounters) { + for (const encounter of encounters) { + if (Array.isArray(encounter.obs)) { + for (const observation of encounter.obs) { + if (observation.concept.uuid === specificConceptUuid) { + console.log('CHILDREN LESS THAN 19 YEARS, CODED'); + return true; + } + } + } + } + return false; + } + + return new Promise((resolve, reject) => { encounter_service - .getEncountersByEncounterType(patient_uuid, family_testing_encounter) + .getEncountersByEncounterType(patient_uuid, primaryFamilyTestingEncounter) .then((encounters) => { - resolve(encounters); + if (encounters == null || encounters.results.length === 0) { + return encounter_service.getEncountersByEncounterType( + patient_uuid, + secondaryFamilyTestingEncounter + ); + } + return encounters; + }) + .then((encounters) => { + if (encounters == null || encounters.results.length === 0) { + resolve(null); + } else { + if (findSpecificObservation(encounters.results)) { + console.log('Encounters from Family testing: ', encounters); + } + resolve(encounters); + } }) .catch((err) => { reject(err); From 2b490fbd3c8d043d31299f764d7a6ee669f861ab Mon Sep 17 00:00:00 2001 From: sainingo Date: Mon, 15 Jul 2024 17:17:12 +0300 Subject: [PATCH 2/6] POC-807: Revise Cervical Cancer Screening Age --- programs/patient-program-config.json | 38 ++++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/programs/patient-program-config.json b/programs/patient-program-config.json index bbe8faff7..34312dc63 100755 --- a/programs/patient-program-config.json +++ b/programs/patient-program-config.json @@ -98,7 +98,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -159,7 +159,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -224,7 +224,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -660,7 +660,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -1369,7 +1369,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -1446,7 +1446,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -1523,7 +1523,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -1596,7 +1596,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -1677,7 +1677,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -1746,7 +1746,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -1847,7 +1847,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -2713,7 +2713,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -2974,7 +2974,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "5ef97eed-18f5-40f6-9fbf-a11b1f06484a", @@ -3071,7 +3071,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -3133,7 +3133,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -3988,7 +3988,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "466d6707-8429-4e61-b5a0-d63444f5ad35", @@ -4027,7 +4027,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -4543,7 +4543,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -4609,7 +4609,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 25 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", From cf2a50ab5b704616b2dc86421f5a6f348b1cb65c Mon Sep 17 00:00:00 2001 From: sainingo Date: Tue, 16 Jul 2024 10:09:45 +0300 Subject: [PATCH 3/6] Revise Cervical Cancer Screening Age --- programs/patient-program-config.json | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/programs/patient-program-config.json b/programs/patient-program-config.json index 34312dc63..dccdeac4e 100755 --- a/programs/patient-program-config.json +++ b/programs/patient-program-config.json @@ -1369,7 +1369,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -1446,7 +1446,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -1523,7 +1523,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -1596,7 +1596,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -1677,7 +1677,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -1746,7 +1746,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -1847,7 +1847,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -2713,7 +2713,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -2974,7 +2974,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "5ef97eed-18f5-40f6-9fbf-a11b1f06484a", @@ -3071,7 +3071,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -3133,7 +3133,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -3988,7 +3988,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "466d6707-8429-4e61-b5a0-d63444f5ad35", @@ -4027,7 +4027,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -4543,7 +4543,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -4609,7 +4609,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" + "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", From ef8023e84628fde832a00c3a0ccc8b18947024de Mon Sep 17 00:00:00 2001 From: sainingo Date: Wed, 17 Jul 2024 16:07:56 +0300 Subject: [PATCH 4/6] Add cervical cancer screening age validation to all programs --- programs/patient-program-config.json | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/programs/patient-program-config.json b/programs/patient-program-config.json index dccdeac4e..34312dc63 100755 --- a/programs/patient-program-config.json +++ b/programs/patient-program-config.json @@ -1369,7 +1369,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -1446,7 +1446,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -1523,7 +1523,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -1596,7 +1596,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -1677,7 +1677,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -1746,7 +1746,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -1847,7 +1847,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -2713,7 +2713,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -2974,7 +2974,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "5ef97eed-18f5-40f6-9fbf-a11b1f06484a", @@ -3071,7 +3071,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -3133,7 +3133,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -3988,7 +3988,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "466d6707-8429-4e61-b5a0-d63444f5ad35", @@ -4027,7 +4027,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", @@ -4543,7 +4543,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "cb5c0abd-0817-40e3-9413-8669561fadb9", @@ -4609,7 +4609,7 @@ { "uuid": "238625fc-8a25-44b2-aa5a-8bf48fa0e18d", "display": "ONCOLOGYVIA", - "allowedIf": "age >= 24 && age <= 49 && gender === 'F'" + "allowedIf": "age >= 15 && age <= 65 && gender === 'F'" }, { "uuid": "ae35ed69-e07c-4209-93ce-f23733aa816b", From 69cd7e03e66e5ac4dd330e709f03ae6cd84b0c29 Mon Sep 17 00:00:00 2001 From: Faith Kamau <121166087+hiqedme@users.noreply.github.com> Date: Fri, 19 Jul 2024 16:13:24 +0300 Subject: [PATCH 5/6] POC-155: --- service/patient-reminder.service.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/service/patient-reminder.service.js b/service/patient-reminder.service.js index 7cba25adc..e645e211d 100755 --- a/service/patient-reminder.service.js +++ b/service/patient-reminder.service.js @@ -542,7 +542,6 @@ function newViralLoadPresent(data) { } function pendingViralLoadLabResult(eidResults) { - // console.log('EID Results', eidResults); let incompleteResult = eidResults.find((result) => { if (result) { if (result.sample_status) { @@ -763,7 +762,6 @@ function getIptCompletionReminder(data) { function getFamilyTestingReminder(data) { let reminders = []; return getEncountersByEncounterType(data[0].person_uuid).then((res) => { - console.log('RES: ', res); if (res.results.length === 0) { reminders.push({ message: @@ -1111,7 +1109,6 @@ function getEncountersByEncounterType(patient_uuid) { if (Array.isArray(encounter.obs)) { for (const observation of encounter.obs) { if (observation.concept.uuid === specificConceptUuid) { - console.log('CHILDREN LESS THAN 19 YEARS, CODED'); return true; } } From e677a9c5c88a64bed18b6f80cf898bb683e77cfe Mon Sep 17 00:00:00 2001 From: Alfred-Mutai Date: Sat, 20 Jul 2024 13:29:12 +0300 Subject: [PATCH 6/6] POC-778: Add pre-appointment visits for AMPATH Uzima and Dumisha patients scale-up in July 2024 --- programs/scope-builder.service.js | 46 +++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/programs/scope-builder.service.js b/programs/scope-builder.service.js index 89c397067..0fa02288d 100755 --- a/programs/scope-builder.service.js +++ b/programs/scope-builder.service.js @@ -79,7 +79,28 @@ function buildScope(dataDictionary) { '09004e76-1352-11df-a1f1-0026b9348838', 'e907044b-4170-49e1-98e8-93258596bb23', '0900b000-1352-11df-a1f1-0026b9348838', - 'b4f7483a-00b8-4ff4-be70-dfefc85c60fa' + 'b4f7483a-00b8-4ff4-be70-dfefc85c60fa', + '9d1025b7-280d-46f7-8f0d-33b3b7aeab41', + 'd0d133f1-22f3-49c3-b9f1-d2f64944eb0d', + '7a8c0cc5-be43-48e1-aa41-33cb1e9cc26f', + '22a1255d-e56b-446a-a32b-e7ea8bd1a89c', + '6cd0b441-d644-487c-8466-5820a73f9ce5', + '523d5060-07ee-46d9-b439-12867c4e83ac', + 'b56b5219-0c8f-4520-810e-ba43302c63eb', + '516c889a-f9ea-4861-b89c-e39f08dfb15c', + 'e05cbb83-9418-4ebc-9240-ae2512d70321', + 'de051b8a-78ab-4fa8-bb08-5364c8e87297', + 'fc26648e-aa47-4928-8595-5c96943b44b2', + '20bd486d-5c84-44f4-9ffa-2f1c1d9e79f8', + 'f0e8d70a-dd24-4f59-bcf3-3566b8a1d5cc', + '0a2d9adf-d758-4c81-8429-2ff54e2c58d6', + '0900b104-1352-11df-a1f1-0026b9348838', + '0943a3b0-3630-4d71-ad09-cc55cfd3bde1', + '0900aace-1352-11df-a1f1-0026b9348838', + '8b6f450b-8a61-4051-b4bd-b1a79cb541ee', + '0900b212-1352-11df-a1f1-0026b9348838', + '48305e5b-2ca5-44e1-8f6b-008c4d2789ba', + '38eec9dd-8b52-4f8c-ad25-f045486299c1' ].includes(dataDictionary.intendedVisitLocationUuid); if (dataDictionary.patient) { buildPatientScopeMembers(scope, dataDictionary.patient); @@ -193,7 +214,28 @@ function buildScope(dataDictionary) { '09004e76-1352-11df-a1f1-0026b9348838', 'e907044b-4170-49e1-98e8-93258596bb23', '0900b000-1352-11df-a1f1-0026b9348838', - 'b4f7483a-00b8-4ff4-be70-dfefc85c60fa' + 'b4f7483a-00b8-4ff4-be70-dfefc85c60fa', + '9d1025b7-280d-46f7-8f0d-33b3b7aeab41', + 'd0d133f1-22f3-49c3-b9f1-d2f64944eb0d', + '7a8c0cc5-be43-48e1-aa41-33cb1e9cc26f', + '22a1255d-e56b-446a-a32b-e7ea8bd1a89c', + '6cd0b441-d644-487c-8466-5820a73f9ce5', + '523d5060-07ee-46d9-b439-12867c4e83ac', + 'b56b5219-0c8f-4520-810e-ba43302c63eb', + '516c889a-f9ea-4861-b89c-e39f08dfb15c', + 'e05cbb83-9418-4ebc-9240-ae2512d70321', + 'de051b8a-78ab-4fa8-bb08-5364c8e87297', + 'fc26648e-aa47-4928-8595-5c96943b44b2', + '20bd486d-5c84-44f4-9ffa-2f1c1d9e79f8', + 'f0e8d70a-dd24-4f59-bcf3-3566b8a1d5cc', + '0a2d9adf-d758-4c81-8429-2ff54e2c58d6', + '0900b104-1352-11df-a1f1-0026b9348838', + '0943a3b0-3630-4d71-ad09-cc55cfd3bde1', + '0900aace-1352-11df-a1f1-0026b9348838', + '8b6f450b-8a61-4051-b4bd-b1a79cb541ee', + '0900b212-1352-11df-a1f1-0026b9348838', + '48305e5b-2ca5-44e1-8f6b-008c4d2789ba', + '38eec9dd-8b52-4f8c-ad25-f045486299c1' ].includes(dataDictionary.intendedVisitLocationUuid); }