From 10f428f0b63a1e09f2074958299f984a149c2ec9 Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Fri, 15 Mar 2024 14:22:01 +0530 Subject: [PATCH] Fixes patient no. not being sent to backend if updated to empty string --- src/Components/Facility/ConsultationForm.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Components/Facility/ConsultationForm.tsx b/src/Components/Facility/ConsultationForm.tsx index 48b8a367e77..402221596ad 100644 --- a/src/Components/Facility/ConsultationForm.tsx +++ b/src/Components/Facility/ConsultationForm.tsx @@ -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, }; - if (state.form.patient_no) data["patient_no"] = state.form.patient_no; - const res = await dispatchAction( id ? updateConsultation(id!, data) : createConsultation(data) );