Skip to content

Commit

Permalink
Merge branch 'develop' into patient_test
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivamJhaa authored Sep 8, 2023
2 parents 8ce1bad + fb4e7be commit 2d9383f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Components/Facility/ConsultationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down 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 2d9383f

Please sign in to comment.