From 528552b400b0754724761bba05869da1a25f0ea8 Mon Sep 17 00:00:00 2001 From: Bhargav kodali <115476530+kb019@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:52:53 -0700 Subject: [PATCH] Update ward-view.resource.ts --- packages/esm-ward-app/src/ward-view/ward-view.resource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/esm-ward-app/src/ward-view/ward-view.resource.ts b/packages/esm-ward-app/src/ward-view/ward-view.resource.ts index 295671dc1..970cad372 100644 --- a/packages/esm-ward-app/src/ward-view/ward-view.resource.ts +++ b/packages/esm-ward-app/src/ward-view/ward-view.resource.ts @@ -43,7 +43,7 @@ export function getWardMetrics(bedLayouts: BedLayout[], wardPatientGroup: WardPa }; if (bedLayouts == null || bedLayouts.length == 0) return bedMetrics; const total = bedLayouts.length; - const occupiedBeds = bedLayouts.filter((bed) => bed.patients.length); + const occupiedBeds = bedLayouts.filter((bed) => bed.patients.length>0); const patients = occupiedBeds.length; const freeBeds = total - patients; const capacity = total != 0 ? Math.trunc((wardPatientGroup.totalPatientsCount / total) * 100) : 0;