From 4ec3cf4aba27d2583f97d14ea7673018c20975a0 Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Fri, 12 Jul 2024 19:12:55 +0530 Subject: [PATCH 1/2] Fixes oxygen flow rate not getting submitted in Critical Care (#8145) --- .../CriticalCare__VentilatorParametersEditor.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/CriticalCareRecording/VentilatorParametersEditor/CriticalCare__VentilatorParametersEditor.res b/src/Components/CriticalCareRecording/VentilatorParametersEditor/CriticalCare__VentilatorParametersEditor.res index 0933f46bf1a..cd3010b1c1d 100644 --- a/src/Components/CriticalCareRecording/VentilatorParametersEditor/CriticalCare__VentilatorParametersEditor.res +++ b/src/Components/CriticalCareRecording/VentilatorParametersEditor/CriticalCare__VentilatorParametersEditor.res @@ -115,7 +115,7 @@ let makePayload = (state: VentilatorParameters.state) => { DictUtils.setOptionalNumber("ventilator_tidal_volume", state.ventilator_tidal_volume, payload) DictUtils.setOptionalNumber( "ventilator_oxygen_modality_oxygen_rate", - state.ventilator_interface === UNKNOWN && + state.ventilator_interface === OXYGEN_SUPPORT && state.ventilator_oxygen_modality !== HIGH_FLOW_NASAL_CANNULA ? state.ventilator_oxygen_modality_oxygen_rate : None, From ae23c516ada97d24ec63a8ffea7481cbc99a5ae5 Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Sat, 13 Jul 2024 12:46:01 +0530 Subject: [PATCH 2/2] Fixes discharge form resetting (#8146) --- src/Components/Facility/DischargeModal.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Components/Facility/DischargeModal.tsx b/src/Components/Facility/DischargeModal.tsx index 1476e38ed03..0ed17210bf8 100644 --- a/src/Components/Facility/DischargeModal.tsx +++ b/src/Components/Facility/DischargeModal.tsx @@ -82,18 +82,15 @@ const DischargeModal = ({ useEffect(() => { setPreDischargeForm((prev) => ({ ...prev, - new_discharge_reason, discharge_notes: referred_to ? "Patient Shifted to another facility." : "", - discharge_date, - death_datetime, referred_to_external: !referred_to?.id ? referred_to?.name : null, referred_to: referred_to?.id ? referred_to.id : null, })); setFacility(referred_to); - }, [referred_to, new_discharge_reason, discharge_date, death_datetime]); + }, [referred_to]); const discharge_reason = new_discharge_reason ?? preDischargeForm.new_discharge_reason;