diff --git a/src/Components/Facility/ConsultationForm.tsx b/src/Components/Facility/ConsultationForm.tsx index 97f35f292f8..49028a62953 100644 --- a/src/Components/Facility/ConsultationForm.tsx +++ b/src/Components/Facility/ConsultationForm.tsx @@ -538,7 +538,7 @@ export const ConsultationForm = (props: any) => { } case "verified_by": { - if (!state.form[field]) { + if (state.form.suggestion !== "DD" && !state.form[field]) { errors[field] = "Please fill verified by"; invalidForm = true; break; @@ -618,6 +618,7 @@ export const ConsultationForm = (props: any) => { }; const declareThePatientDead = async ( + id: string, cause_of_death: string, death_datetime: string, death_confirmed_doctor: string @@ -629,6 +630,7 @@ export const ConsultationForm = (props: any) => { discharge_notes: cause_of_death, death_datetime: death_datetime, death_confirmed_doctor: death_confirmed_doctor, + discharge_date: dayjs().toISOString(), }, { id } ) @@ -714,6 +716,7 @@ export const ConsultationForm = (props: any) => { if (data.suggestion === "DD") { await declareThePatientDead( + res.data.id, state.form.cause_of_death, state.form.death_datetime, state.form.death_confirmed_doctor