Skip to content

Commit

Permalink
Fixes patient no. not being sent to backend if updated to empty string (
Browse files Browse the repository at this point in the history
#7418)

* Fixes patient no. not being sent to backend if updated to empty string

* minor fix
  • Loading branch information
rithviknishad authored Mar 15, 2024
1 parent f39ce83 commit ad8b5e8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Components/Facility/ConsultationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -761,10 +761,9 @@ export const ConsultationForm = ({ facilityId, patientId, id }: Props) => {
weight: Number(state.form.weight),
height: Number(state.form.height),
bed: bed && bed instanceof Array ? bed[0]?.id : bed?.id,
patient_no: state.form.patient_no || null,
};

if (state.form.patient_no) data["patient_no"] = state.form.patient_no;

const res = await dispatchAction(
id ? updateConsultation(id!, data) : createConsultation(data)
);
Expand Down

0 comments on commit ad8b5e8

Please sign in to comment.