From 5a2824ceec19a10150548d4482851ecda5843a52 Mon Sep 17 00:00:00 2001 From: AdityaJ2305 Date: Sat, 14 Dec 2024 13:51:51 +0530 Subject: [PATCH 1/4] Fix: Discharge patient showing live --- src/components/Facility/ConsultationCard.tsx | 44 ++++++++++++++----- .../Patient/PatientDetailsTab/Demography.tsx | 18 -------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/src/components/Facility/ConsultationCard.tsx b/src/components/Facility/ConsultationCard.tsx index a2ede9f2667..797eb08ae4a 100644 --- a/src/components/Facility/ConsultationCard.tsx +++ b/src/components/Facility/ConsultationCard.tsx @@ -30,6 +30,7 @@ export const ConsultationCard = (props: ConsultationProps) => { : !itemData.current_bed ? t("assign_bed") : t("switch_bed"); + return ( <> { )}
- -
- {dayjs(itemData.created_date).format("DD/MM/YYYY")} +
+
+ +
+ {dayjs(itemData.created_date).format("DD/MM/YYYY")} +
+
+ + {/* Patient Status Section */} +
+
+ {t("patient_status")} +
+ +
{itemData.is_kasp && ( diff --git a/src/components/Patient/PatientDetailsTab/Demography.tsx b/src/components/Patient/PatientDetailsTab/Demography.tsx index e5bed5abfee..130e8fd2ab8 100644 --- a/src/components/Patient/PatientDetailsTab/Demography.tsx +++ b/src/components/Patient/PatientDetailsTab/Demography.tsx @@ -3,7 +3,6 @@ import { navigate } from "raviger"; import { Fragment, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import Chip from "@/CAREUI/display/Chip"; import CareIcon from "@/CAREUI/icons/CareIcon"; import AuthorizedChild from "@/CAREUI/misc/AuthorizedChild"; @@ -358,23 +357,6 @@ export const Demography = (props: PatientProps) => {
-
-
- {t("patient_status")} -
-
- -
-
{({ isAuthorized }) => ( From 38dda12d2ea723dc79f928f2bd7f15c24e102c77 Mon Sep 17 00:00:00 2001 From: AdityaJ2305 Date: Sun, 15 Dec 2024 19:09:35 +0530 Subject: [PATCH 2/4] last consultation for specific facility --- src/components/Patient/PatientDetailsTab/EncounterHistory.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/Patient/PatientDetailsTab/EncounterHistory.tsx b/src/components/Patient/PatientDetailsTab/EncounterHistory.tsx index b81009efa74..164883be77d 100644 --- a/src/components/Patient/PatientDetailsTab/EncounterHistory.tsx +++ b/src/components/Patient/PatientDetailsTab/EncounterHistory.tsx @@ -74,8 +74,7 @@ const EncounterHistory = (props: PatientProps) => { From 5f6119e76a4df1cbd3729b22f9ff6c73d90d601c Mon Sep 17 00:00:00 2001 From: AdityaJ2305 Date: Mon, 16 Dec 2024 17:54:35 +0530 Subject: [PATCH 3/4] updated to discharge date --- src/components/Facility/ConsultationCard.tsx | 4 ++-- src/components/Patient/PatientDetailsTab/EncounterHistory.tsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Facility/ConsultationCard.tsx b/src/components/Facility/ConsultationCard.tsx index 797eb08ae4a..9942f2efd74 100644 --- a/src/components/Facility/ConsultationCard.tsx +++ b/src/components/Facility/ConsultationCard.tsx @@ -80,11 +80,11 @@ export const ConsultationCard = (props: ConsultationProps) => { size="medium" variant="custom" className={ - !isLastConsultation + !itemData.discharge_date ? "bg-blue-100 text-blue-800" : "bg-red-100 text-red-800" } - text={!isLastConsultation ? "LIVE" : "DISCHARGED"} + text={!itemData.discharge_date ? "LIVE" : "DISCHARGED"} />
diff --git a/src/components/Patient/PatientDetailsTab/EncounterHistory.tsx b/src/components/Patient/PatientDetailsTab/EncounterHistory.tsx index 164883be77d..b81009efa74 100644 --- a/src/components/Patient/PatientDetailsTab/EncounterHistory.tsx +++ b/src/components/Patient/PatientDetailsTab/EncounterHistory.tsx @@ -74,7 +74,8 @@ const EncounterHistory = (props: PatientProps) => { From 0a0424fda7aeaeea5874b7710ee848029e1157c0 Mon Sep 17 00:00:00 2001 From: AdityaJ2305 Date: Tue, 17 Dec 2024 17:27:30 +0530 Subject: [PATCH 4/4] update size to small --- src/components/Facility/ConsultationCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Facility/ConsultationCard.tsx b/src/components/Facility/ConsultationCard.tsx index 9942f2efd74..d67926a3c6b 100644 --- a/src/components/Facility/ConsultationCard.tsx +++ b/src/components/Facility/ConsultationCard.tsx @@ -77,7 +77,7 @@ export const ConsultationCard = (props: ConsultationProps) => { {t("patient_status")}