From 6ef8a5d1d96df4833675a95d2dc15daada40a548 Mon Sep 17 00:00:00 2001 From: Sulochan Khadka <122200551+Sulochan-khadka@users.noreply.github.com> Date: Wed, 15 May 2024 04:09:32 +0530 Subject: [PATCH] fixes: (#7816) remove COVID Status from Patient details page #7813 --- src/Components/Patient/PatientHome.tsx | 29 ++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/Components/Patient/PatientHome.tsx b/src/Components/Patient/PatientHome.tsx index 7492f29c5c..b82fa899e8 100644 --- a/src/Components/Patient/PatientHome.tsx +++ b/src/Components/Patient/PatientHome.tsx @@ -591,18 +591,39 @@ export const PatientHome = (props: any) => {
- COVID Status + Status
- {patientData.disease_status} + {patientData.is_active ? "LIVE" : "DISCHARGED"}
- Status + Last Discharged Reason
- {patientData.is_active ? "LIVE" : "DISCHARGED"} + {patientData.is_active ? ( + "-" + ) : !patientData.last_consultation + ?.new_discharge_reason ? ( + + {patientData?.last_consultation?.suggestion === "OP" + ? "OP file closed" + : "UNKNOWN"} + + ) : patientData.last_consultation + ?.new_discharge_reason === + DISCHARGE_REASONS.find((i) => i.text == "Expired") + ?.id ? ( + EXPIRED + ) : ( + DISCHARGE_REASONS.find( + (reason) => + reason.id === + patientData.last_consultation + ?.new_discharge_reason, + )?.text + )}