From 6ff1813c28fdf453322549d7842724ba363223c7 Mon Sep 17 00:00:00 2001 From: Ashesh3 <3626859+Ashesh3@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:24:14 +0530 Subject: [PATCH 1/2] Move Diagnoses data to Info Tab --- .../ConsultationUpdatesTab.tsx | 116 ++++++++++-------- .../Facility/ConsultationDetails/index.tsx | 31 +++-- 2 files changed, 83 insertions(+), 64 deletions(-) diff --git a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index beac7f595a8..03180d857b2 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -13,6 +13,7 @@ import Chip from "../../../CAREUI/display/Chip"; import { formatAge, formatDate, formatDateTime } from "../../../Utils/utils"; import ReadMore from "../../Common/components/Readmore"; import DailyRoundsList from "../Consultations/DailyRoundsList"; +import LegacyDiagnosesList from "../../Diagnosis/LegacyDiagnosesList"; const PageTitle = lazy(() => import("../../Common/PageTitle")); @@ -615,58 +616,71 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => { )} - -
-
-

- Body Details -

-
-
- Gender {" - "} - - {props.patientData.gender ?? "-"} - -
-
- Age {" - "} - - {props.patientData.age !== undefined // 0 is a valid age, so we need to check for undefined - ? formatAge( - props.patientData.age, - props.patientData.date_of_birth - ) - : "-"} - -
-
- Weight {" - "} - - {props.consultationData.weight ?? "-"} Kg - -
-
- Height {" - "} - - {props.consultationData.height ?? "-"} cm - -
-
- Body Surface Area {" - "} - - {Math.sqrt( - (Number(props.consultationData.weight) * - Number(props.consultationData.height)) / - 3600 - ).toFixed(2)}{" "} - m2 - +
+
+
+

+ Diagnoses +

+
+
-
- Blood Group {" - "} - - {props.patientData.blood_group ?? "-"} - +
+
+
+
+

+ Body Details +

+
+
+ Gender {" - "} + + {props.patientData.gender ?? "-"} + +
+
+ Age {" - "} + + {props.patientData.age !== undefined // 0 is a valid age, so we need to check for undefined + ? formatAge( + props.patientData.age, + props.patientData.date_of_birth + ) + : "-"} + +
+
+ Weight {" - "} + + {props.consultationData.weight ?? "-"} Kg + +
+
+ Height {" - "} + + {props.consultationData.height ?? "-"} cm + +
+
+ Body Surface Area {" - "} + + {Math.sqrt( + (Number(props.consultationData.weight) * + Number(props.consultationData.height)) / + 3600 + ).toFixed(2)}{" "} + m2 + +
+
+ Blood Group {" - "} + + {props.patientData.blood_group ?? "-"} + +
diff --git a/src/Components/Facility/ConsultationDetails/index.tsx b/src/Components/Facility/ConsultationDetails/index.tsx index c6cc9e02275..3070813855c 100644 --- a/src/Components/Facility/ConsultationDetails/index.tsx +++ b/src/Components/Facility/ConsultationDetails/index.tsx @@ -37,7 +37,6 @@ import { ConsultationDialysisTab } from "./ConsultationDialysisTab"; import { ConsultationNeurologicalMonitoringTab } from "./ConsultationNeurologicalMonitoringTab"; import { ConsultationNutritionTab } from "./ConsultationNutritionTab"; import PatientNotesSlideover from "../PatientNotesSlideover"; -import LegacyDiagnosesList from "../../Diagnosis/LegacyDiagnosesList"; import { AssetBedModel } from "../../Assets/AssetTypes"; const Loading = lazy(() => import("../../Common/Loading")); @@ -377,18 +376,24 @@ export const ConsultationDetails = (props: any) => {
- {/*consultationData.other_symptoms && ( -
- - Other Symptoms:{" "} - - {consultationData.other_symptoms} -
- )*/} - - + {consultationData.diagnoses?.length + ? (() => { + const principal_diagnosis = + consultationData.diagnoses.find( + (diagnosis) => diagnosis.is_principal + ); + return principal_diagnosis ? ( +
+
+ Principal Diagnosis +
+
+ {principal_diagnosis.diagnosis_object.label} +
+
+ ) : null; + })() + : null} {(consultationData.treating_physician_object || consultationData.deprecated_verified_by) && ( From 52963ab43a7317e2adbdbb314c03a3bd50f0b6cf Mon Sep 17 00:00:00 2001 From: Ashesh3 <3626859+Ashesh3@users.noreply.github.com> Date: Thu, 4 Jan 2024 21:02:35 +0530 Subject: [PATCH 2/2] Add CareIcon for diagnosis verification status --- src/Components/Facility/ConsultationDetails/index.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Components/Facility/ConsultationDetails/index.tsx b/src/Components/Facility/ConsultationDetails/index.tsx index 3070813855c..d7e28a5d9e6 100644 --- a/src/Components/Facility/ConsultationDetails/index.tsx +++ b/src/Components/Facility/ConsultationDetails/index.tsx @@ -38,6 +38,7 @@ import { ConsultationNeurologicalMonitoringTab } from "./ConsultationNeurologica import { ConsultationNutritionTab } from "./ConsultationNutritionTab"; import PatientNotesSlideover from "../PatientNotesSlideover"; import { AssetBedModel } from "../../Assets/AssetTypes"; +import CareIcon from "../../../CAREUI/icons/CareIcon"; const Loading = lazy(() => import("../../Common/Loading")); const PageTitle = lazy(() => import("../../Common/PageTitle")); @@ -387,8 +388,14 @@ export const ConsultationDetails = (props: any) => {
Principal Diagnosis
-
- {principal_diagnosis.diagnosis_object.label} +
+ {principal_diagnosis.diagnosis_object.label}{" "} + + +

+ {principal_diagnosis.verification_status} +

+
) : null;