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,