From 87f36ba0332f69fce09ef08dc182449513fa2059 Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Tue, 12 Sep 2023 19:24:12 +0530 Subject: [PATCH] add readmission (#6239) --- src/Components/Facility/ConsultationCard.tsx | 10 ++++++++++ src/Components/Facility/models.tsx | 1 + src/Components/Patient/ManagePatients.tsx | 9 +++++++++ src/Components/Patient/PatientInfoCard.tsx | 17 +++++++++++++---- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/Components/Facility/ConsultationCard.tsx b/src/Components/Facility/ConsultationCard.tsx index 467729f0f73..f6b4484b477 100644 --- a/src/Components/Facility/ConsultationCard.tsx +++ b/src/Components/Facility/ConsultationCard.tsx @@ -5,6 +5,7 @@ import ButtonV2 from "../Common/components/ButtonV2"; import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import RelativeDateUserMention from "../Common/RelativeDateUserMention"; import useConfig from "../../Common/hooks/useConfig"; +import Chip from "../../CAREUI/display/Chip"; interface ConsultationProps { itemData: ConsultationModel; @@ -70,6 +71,15 @@ export const ConsultationCard = (props: ConsultationProps) => {
{formatDateTime(itemData.admission_date)} + {itemData.is_readmission && ( + + )}
diff --git a/src/Components/Facility/models.tsx b/src/Components/Facility/models.tsx index 012ca1d68b2..cc34140e7a9 100644 --- a/src/Components/Facility/models.tsx +++ b/src/Components/Facility/models.tsx @@ -142,6 +142,7 @@ export interface ConsultationModel { cause_of_death?: string; death_datetime?: string; death_confirmed_doctor?: string; + is_readmission?: boolean; } export interface PatientStatsModel { id?: number; diff --git a/src/Components/Patient/ManagePatients.tsx b/src/Components/Patient/ManagePatients.tsx index b29c112c5a1..54d22b5f54c 100644 --- a/src/Components/Patient/ManagePatients.tsx +++ b/src/Components/Patient/ManagePatients.tsx @@ -603,6 +603,15 @@ export const PatientManager = () => { text="Review Missed" /> )} + {patient.last_consultation?.is_readmission && ( + + )} {patient.disease_status === "POSITIVE" && ( )} -
+
- - Domiciliary Care{" "} - + + + Domiciliary Care + + + )} + {consultation?.is_readmission && ( + <> + + + + Readmitted )}