diff --git a/src/Components/Patient/PatientHome.tsx b/src/Components/Patient/PatientHome.tsx index c3bc1009a40..15c4a7c52ac 100644 --- a/src/Components/Patient/PatientHome.tsx +++ b/src/Components/Patient/PatientHome.tsx @@ -1,4 +1,3 @@ -import { CircularProgress } from "@material-ui/core"; import { navigate } from "raviger"; import moment from "moment"; import React, { useCallback, useEffect, useState } from "react"; @@ -23,11 +22,6 @@ import { ConsultationCard } from "../Facility/ConsultationCard"; import { ConsultationModel } from "../Facility/models"; import { PatientModel, SampleTestModel } from "./models"; import { SampleTestCard } from "./SampleTestCard"; -import Dialog from "@material-ui/core/Dialog"; -import DialogActions from "@material-ui/core/DialogActions"; -import DialogTitle from "@material-ui/core/DialogTitle"; -import { LegacyErrorHelperText } from "../Common/HelperInputFields"; -import Modal from "@material-ui/core/Modal"; import Chip from "../../CAREUI/display/Chip"; import { classNames, formatDate } from "../../Utils/utils"; import ButtonV2 from "../Common/components/ButtonV2"; @@ -35,9 +29,12 @@ import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor"; import RelativeDateUserMention from "../Common/RelativeDateUserMention"; import CareIcon from "../../CAREUI/icons/CareIcon"; import { useTranslation } from "react-i18next"; +import CircularProgress from "../Common/components/CircularProgress"; +import Page from "../Common/components/Page"; +import ConfirmDialogV2 from "../Common/ConfirmDialogV2"; +import { FieldErrorText } from "../Form/FormFields/FormField"; const Loading = loadable(() => import("../Common/Loading")); -const PageTitle = loadable(() => import("../Common/PageTitle")); export const PatientHome = (props: any) => { const { facilityId, id } = props; @@ -339,7 +336,7 @@ export const PatientHome = (props: any) => { let consultationList, sampleList; if (isConsultationLoading) { - consultationList = ; + consultationList = ; } else if (consultationListData.length === 0) { consultationList = (
@@ -360,7 +357,7 @@ export const PatientHome = (props: any) => { } if (isSampleLoading) { - sampleList = ; + sampleList = ; } else if (sampleListData.length === 0) { sampleList = (
@@ -394,7 +391,14 @@ export const PatientHome = (props: any) => { }; return ( -
+ {showAlertMessage.show && ( { /> )} -
- - +
@@ -959,55 +952,19 @@ export const PatientHome = (props: any) => { > {t("transfer_to_receiving_facility")} - setModalFor({ externalId: undefined, loading: false, }) } - > -
-
-
-

- Confirm Transfer Complete! -

-
-
-

- Are you sure you want to mark this - transfer as complete? The Origin facility - will no longer have access to this patient -

-
-
- { - setModalFor({ - externalId: undefined, - loading: false, - }); - }} - > - Cancel - - - handleTransferComplete(shift) - } - > - Confirm - -
-
-
-
+ onConfirm={() => handleTransferComplete(shift)} + />
)}
@@ -1482,16 +1439,11 @@ export const PatientHome = (props: any) => {
- setOpenAssignVolunteerDialog(false)} - > -
- - Assign a volunteer to {patientData.name} - - + description={
{ user_type={"Volunteer"} outline={false} /> - +
- - - { - handleVolunteerSelect(patientData.assigned_to_object); - setOpenAssignVolunteerDialog(false); - }} - > - Cancel - - Submit - -
-
+ } + action="Assign" + onConfirm={handleAssignedVolunteer} + />

@@ -1551,6 +1492,6 @@ export const PatientHome = (props: any) => {

)}
-
+
); };