From 8527c7bb81705d191069ca420ea3e85d544e675d Mon Sep 17 00:00:00 2001 From: Pranshu1902 Date: Sat, 2 Dec 2023 17:41:34 +0530 Subject: [PATCH 1/7] show icu admission date --- .../ConsultationUpdatesTab.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index bb584ae93e6..c654d2650b9 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -362,6 +362,23 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => { )}
+
+
+
+ Admission On +
+ {formatDateTime(props.consultationData?.admission_date)} +
+
+
+ ICU Admission Date & Time +
+ {formatDateTime( + props.consultationData?.icu_admission_date + )} +
+
+
Consultation Update
From c10e9004264ff9a01dd70afdfcf2c1ff026d1dc3 Mon Sep 17 00:00:00 2001 From: Pranshu1902 Date: Sat, 2 Dec 2023 17:43:13 +0530 Subject: [PATCH 2/7] refactor --- .../Facility/ConsultationDetails/ConsultationUpdatesTab.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index c654d2650b9..1c408165f07 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -365,7 +365,7 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => {
- Admission On + Admission Date
{formatDateTime(props.consultationData?.admission_date)}
From 32f635dd4e5e74b4ba94190e4fad082dd2afe436 Mon Sep 17 00:00:00 2001 From: Pranshu1902 Date: Sat, 2 Dec 2023 20:28:22 +0530 Subject: [PATCH 3/7] handle case when data isn't present --- .../ConsultationUpdatesTab.tsx | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index 1c408165f07..f258ce0919e 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -363,22 +363,27 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => { )}
-
-
- Admission Date + {props.consultationData.admission_date && ( +
+
+ Admission Date +
+ {formatDateTime( + props.consultationData?.admission_date + )}
- {formatDateTime(props.consultationData?.admission_date)} -
-
-
- ICU Admission Date & Time + )} + {props.consultationData.icu_admission_date && ( +
+
+ ICU Admission Date & Time +
+ {formatDateTime( + props.consultationData.icu_admission_date + )}
- {formatDateTime( - props.consultationData?.icu_admission_date - )} -
+ )}
-
Consultation Update
From b032829ef249f15a29ba1478a6fb9d53c9cb2c5e Mon Sep 17 00:00:00 2001 From: Pranshu1902 Date: Sat, 2 Dec 2023 20:39:58 +0530 Subject: [PATCH 4/7] fix padding --- .../Facility/ConsultationDetails/ConsultationUpdatesTab.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index f258ce0919e..e7d9384b512 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -364,7 +364,7 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => {
{props.consultationData.admission_date && ( -
+
Admission Date
@@ -374,9 +374,9 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => {
)} {props.consultationData.icu_admission_date && ( -
+
- ICU Admission Date & Time + ICU Admission Date
{formatDateTime( props.consultationData.icu_admission_date From 64e243f4699deac2d9e5044d6280f0b09cbf57a6 Mon Sep 17 00:00:00 2001 From: Pranshu1902 Date: Wed, 27 Dec 2023 15:41:23 +0530 Subject: [PATCH 5/7] update variable to encounter_date --- .../Facility/ConsultationDetails/ConsultationUpdatesTab.tsx | 4 ++-- src/Components/Facility/models.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index e7d9384b512..137b979e4f2 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -363,13 +363,13 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => { )}
- {props.consultationData.admission_date && ( + {props.consultationData.encounter_date && (
Admission Date
{formatDateTime( - props.consultationData?.admission_date + props.consultationData?.encounter_date )}
)} diff --git a/src/Components/Facility/models.tsx b/src/Components/Facility/models.tsx index cdc7074c145..e0d71426126 100644 --- a/src/Components/Facility/models.tsx +++ b/src/Components/Facility/models.tsx @@ -92,6 +92,7 @@ export type PatientCategory = export interface ConsultationModel { admission_date?: string; + encounter_date?: string; icu_admission_date?: string; admitted?: boolean; test_id?: string; From 21fbc750b4e92d6a520e0f1714a9a5a59e736406 Mon Sep 17 00:00:00 2001 From: Pranshu1902 Date: Wed, 27 Dec 2023 20:08:51 +0530 Subject: [PATCH 6/7] show admission date in banner --- .../ConsultationUpdatesTab.tsx | 22 ------------------ src/Components/Patient/PatientInfoCard.tsx | 23 ++++++++++++++++++- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index eca3eb5ad47..beac7f595a8 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -361,28 +361,6 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => { )}
-
- {props.consultationData.encounter_date && ( -
-
- Admission Date -
- {formatDateTime( - props.consultationData?.encounter_date - )} -
- )} - {props.consultationData.icu_admission_date && ( -
-
- ICU Admission Date -
- {formatDateTime( - props.consultationData.icu_admission_date - )} -
- )} -
Consultation Update
diff --git a/src/Components/Patient/PatientInfoCard.tsx b/src/Components/Patient/PatientInfoCard.tsx index b9d1d256566..be7f916fe0d 100644 --- a/src/Components/Patient/PatientInfoCard.tsx +++ b/src/Components/Patient/PatientInfoCard.tsx @@ -314,7 +314,7 @@ export default function PatientInfoCard(props: { ); })}
- {!!consultation?.discharge_date && ( + {consultation?.discharge_date ? (
@@ -340,6 +340,27 @@ export default function PatientInfoCard(props: {
+ ) : ( +
+
+ + {consultation?.encounter_date && ( +
+ Admission on{" "} + {formatDateTime(consultation?.encounter_date)} +
+ )} + {consultation?.icu_admission_date && ( +
+
+ ICU Admission on +
+ {formatDateTime(consultation?.icu_admission_date)} +
+ )} +
+
+
)}
From 202802ca40ac0ef7b30d105b2ccf9a9f4ff95415 Mon Sep 17 00:00:00 2001 From: Pranshu1902 Date: Thu, 28 Dec 2023 15:24:48 +0530 Subject: [PATCH 7/7] fix placement --- src/Components/Patient/PatientInfoCard.tsx | 32 ++++++++++------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/src/Components/Patient/PatientInfoCard.tsx b/src/Components/Patient/PatientInfoCard.tsx index be7f916fe0d..bd6bf269373 100644 --- a/src/Components/Patient/PatientInfoCard.tsx +++ b/src/Components/Patient/PatientInfoCard.tsx @@ -342,24 +342,20 @@ export default function PatientInfoCard(props: {
) : (
-
- - {consultation?.encounter_date && ( -
- Admission on{" "} - {formatDateTime(consultation?.encounter_date)} -
- )} - {consultation?.icu_admission_date && ( -
-
- ICU Admission on -
- {formatDateTime(consultation?.icu_admission_date)} -
- )} -
-
+ + {consultation?.encounter_date && ( +
+ Admission on{" "} + {formatDateTime(consultation?.encounter_date)} +
+ )} + {consultation?.icu_admission_date && ( +
+ , ICU Admission on{" "} + {formatDateTime(consultation?.icu_admission_date)} +
+ )} +
)}