From ad8b5e8ea46785555b53c255fcb93af758df0498 Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Fri, 15 Mar 2024 15:35:23 +0530 Subject: [PATCH] Fixes patient no. not being sent to backend if updated to empty string (#7418) * Fixes patient no. not being sent to backend if updated to empty string * minor fix --- 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..70e78ccb3c8 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 || null, }; - if (state.form.patient_no) data["patient_no"] = state.form.patient_no; - const res = await dispatchAction( id ? updateConsultation(id!, data) : createConsultation(data) );