From 5fcb793c12997f6be38932e92aaad72e144b5cea Mon Sep 17 00:00:00 2001 From: Srayash Singh <146334722+Srayash@users.noreply.github.com> Date: Wed, 13 Nov 2024 20:47:07 +0530 Subject: [PATCH] Remove Add Consultation from patient details --- src/components/Patient/PatientHome.tsx | 55 ++++---------------------- 1 file changed, 8 insertions(+), 47 deletions(-) diff --git a/src/components/Patient/PatientHome.tsx b/src/components/Patient/PatientHome.tsx index 6bda169cdc7..18f87c010ab 100644 --- a/src/components/Patient/PatientHome.tsx +++ b/src/components/Patient/PatientHome.tsx @@ -241,10 +241,15 @@ export const PatientHome = (props: any) => { !(patientData?.last_consultation?.facility === facilityId) ); }; + // Commented out as this is no longer used should I completely remove this? - const isPatientEligibleForNewConsultation = (patientData: PatientModel) => { - return patientData.is_active ? true : false; - }; + // const isPatientEligibleForNewConsultation = (patientData: PatientModel) => { + // return patientData.is_active && + // (!patientData?.last_consultation || + // patientData?.last_consultation?.discharge_date) + // ? true + // : false; + // }; return ( { )}
{
-
- isPatientEligibleForNewConsultation(patientData) && - navigate( - `/facility/${patientData?.facility}/patient/${id}/consultation`, - ) - } - > -
-
- - - -
- -
-

- Add Consultation -

-
-
-
navigate(`/patient/${id}/investigation_reports`)}