From d6f5230fd6a5f774e9a14665d6686604ad65c23f Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Mon, 29 Apr 2024 15:43:05 +0530 Subject: [PATCH] Fixes #6684; Adds IP Days chip for admission encounters --- src/Components/Patient/ManagePatients.tsx | 10 ++++++++++ src/Components/Patient/PatientInfoCard.tsx | 21 +++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/Components/Patient/ManagePatients.tsx b/src/Components/Patient/ManagePatients.tsx index 35a5bbfea0..894cea89e6 100644 --- a/src/Components/Patient/ManagePatients.tsx +++ b/src/Components/Patient/ManagePatients.tsx @@ -577,6 +577,16 @@ export const PatientManager = () => { text="Readmission" /> )} + {patient.last_consultation?.suggestion === "A" && + patient.last_consultation.facility === patient.facility && + !patient.last_consultation.discharge_date && ( + + )} {patient.disease_status === "POSITIVE" && ( + {consultation?.suggestion === "A" && ( +
+
+
+ + {dayjs(consultation.discharge_date || undefined).diff( + consultation.encounter_date, + "day", + )} + +
+
+ + IP Days + +
+ )} {consultation?.last_daily_round && (