diff --git a/src/Components/Facility/DischargeModal.tsx b/src/Components/Facility/DischargeModal.tsx index 138e74fb9b9..53325455489 100644 --- a/src/Components/Facility/DischargeModal.tsx +++ b/src/Components/Facility/DischargeModal.tsx @@ -8,9 +8,7 @@ import ClaimDetailCard from "../HCX/ClaimDetailCard"; import { ConsultationModel } from "./models"; import CreateClaimCard from "../HCX/CreateClaimCard"; import { DISCHARGE_REASONS } from "../../Common/constants"; -import DateFormField from "../Form/FormFields/DateFormField"; import DialogModal from "../Common/Dialog"; -import { FieldChangeEvent } from "../Form/FormFields/Utils"; import { FieldLabel } from "../Form/FormFields/FormField"; import { HCXActions } from "../../Redux/actions"; import { HCXClaimModel } from "../HCX/models"; @@ -161,11 +159,6 @@ const DischargeModal = ({ setIsSendingDischargeApi(false); if (dischargeResponse?.status === 200) { - // TODO: check this later - // const dischargeData = Object.assign({}, patientData); - // dischargeData["discharge"] = value; - // setPatientData(dischargeData); - Notification.Success({ msg: "Patient Discharged Successfully", }); @@ -174,15 +167,6 @@ const DischargeModal = ({ } }; - const handleDateChange = (e: FieldChangeEvent) => { - setPreDischargeForm((form) => { - return { - ...form, - discharge_date: e.value.toString(), - }; - }); - }; - const handleFacilitySelect = (selected: FacilityModel) => { setFacility(selected); const { id, name } = selected || {}; @@ -266,18 +250,27 @@ const DischargeModal = ({ /> {preDischargeForm.discharge_reason === "REC" && (
- { + setPreDischargeForm((form) => { + return { + ...form, + discharge_date: e.value, + }; + }); + }} />
@@ -330,17 +323,27 @@ const DischargeModal = ({ )} {["REF", "LAMA"].includes(preDischargeForm.discharge_reason) && (
- { + setPreDischargeForm((form) => { + return { + ...form, + discharge_date: e.value, + }; + }); + }} />
)}