Skip to content

Commit

Permalink
Update ward-view.resource.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
kb019 authored Oct 7, 2024
1 parent af5f66e commit 528552b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/esm-ward-app/src/ward-view/ward-view.resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 528552b

Please sign in to comment.