Skip to content

Commit

Permalink
fix decalre dead
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Sep 8, 2023
1 parent 89137e8 commit 4a7d832
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Components/Facility/ConsultationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }
)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4a7d832

Please sign in to comment.