diff --git a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx index ed2d4277c54..bed861042ba 100644 --- a/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx +++ b/src/Components/Facility/ConsultationDetails/ConsultationUpdatesTab.tsx @@ -14,6 +14,7 @@ import { formatAge, formatDate, formatDateTime } from "../../../Utils/utils"; import ReadMore from "../../Common/components/Readmore"; import DailyRoundsList from "../Consultations/DailyRoundsList"; import { getVitalsMonitorSocketUrl } from "../../VitalsMonitor/utils"; +import LegacyDiagnosesList from "../../Diagnosis/LegacyDiagnosesList"; const PageTitle = lazy(() => import("../../Common/PageTitle")); @@ -595,58 +596,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..d7e28a5d9e6 100644 --- a/src/Components/Facility/ConsultationDetails/index.tsx +++ b/src/Components/Facility/ConsultationDetails/index.tsx @@ -37,8 +37,8 @@ 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"; +import CareIcon from "../../../CAREUI/icons/CareIcon"; const Loading = lazy(() => import("../../Common/Loading")); const PageTitle = lazy(() => import("../../Common/PageTitle")); @@ -377,18 +377,30 @@ 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}{" "} + + +

+ {principal_diagnosis.verification_status} +

+
+
+
+ ) : null; + })() + : null} {(consultationData.treating_physician_object || consultationData.deprecated_verified_by) && (