From ead041beb1f4cd2e5f7f51d4ee53d05a250b4ce5 Mon Sep 17 00:00:00 2001 From: Aditya Jindal Date: Thu, 12 Dec 2024 22:56:50 +0530 Subject: [PATCH] Fix: Allergy count to Updated to has allergies text (#9399) --- public/locale/en.json | 1 + src/components/Patient/PatientHome.tsx | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/public/locale/en.json b/public/locale/en.json index 4fb925ac941..4b262e61d10 100644 --- a/public/locale/en.json +++ b/public/locale/en.json @@ -794,6 +794,7 @@ "get_tests": "Get Tests", "goal": "Our goal is to continuously improve the quality and accessibility of public healthcare services using digital tools.", "granted_on": "Granted On", + "has_allergies": "Has Allergies", "has_domestic_healthcare_support": "Has domestic healthcare support?", "has_sari": "Has SARI (Severe Acute Respiratory illness)?", "health-profile": "Health Profile", diff --git a/src/components/Patient/PatientHome.tsx b/src/components/Patient/PatientHome.tsx index 48d754d6d26..7ae439fa80b 100644 --- a/src/components/Patient/PatientHome.tsx +++ b/src/components/Patient/PatientHome.tsx @@ -362,13 +362,14 @@ export const PatientHome = (props: { text={t("TELEMEDICINE")} /> )} - {patientData.allergies && ( - - )} + {patientData.allergies && + patientData.allergies.trim().length > 0 && ( + + )}