From 5ba180035f3bf75ef2411c3d0a895e67bdc1ba55 Mon Sep 17 00:00:00 2001 From: lucyjemutai <130601439+lucyjemutai@users.noreply.github.com> Date: Fri, 3 Nov 2023 17:56:43 +0300 Subject: [PATCH] ANC and L&D entries for male clients discontinued --- packages/esm-ohri-pmtct-app/src/dashboard.meta.tsx | 1 + packages/esm-ohri-pmtct-app/src/index.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/esm-ohri-pmtct-app/src/dashboard.meta.tsx b/packages/esm-ohri-pmtct-app/src/dashboard.meta.tsx index a324ee6e3..9b24fad76 100644 --- a/packages/esm-ohri-pmtct-app/src/dashboard.meta.tsx +++ b/packages/esm-ohri-pmtct-app/src/dashboard.meta.tsx @@ -4,6 +4,7 @@ export const mchFolderMeta = { title: 'Maternal & Child Health', slotName: 'mch-slot', isExpanded: false, + patientExpression: 'calculateAge(patient.birthDate) <= 10 || patient.gender === "female"', }; export const mchSummaryDashboardMeta = { diff --git a/packages/esm-ohri-pmtct-app/src/index.ts b/packages/esm-ohri-pmtct-app/src/index.ts index 6562fd46f..87f28e225 100644 --- a/packages/esm-ohri-pmtct-app/src/index.ts +++ b/packages/esm-ohri-pmtct-app/src/index.ts @@ -13,6 +13,7 @@ import { createOHRIDashboardLink, OHRIHome, OHRIWelcomeSection, + createConditionalDashboardGroup, } from '@ohri/openmrs-esm-ohri-commons-lib'; import { generateInfantPTrackerId } from './utils/ptracker-forms-helpers'; @@ -66,7 +67,7 @@ export function startupApp() { ); } -export const mchDashboard = getSyncLifecycle(createDashboardGroup(mchFolderMeta), options); +export const mchDashboard = getSyncLifecycle(createConditionalDashboardGroup(mchFolderMeta), options); export const mchSummaryDashboardLink = getSyncLifecycle( createDashboardLink({ ...mchSummaryDashboardMeta, moduleName }), options,