From a273d255e9c314b8bdd1f6abfb6a518c2be16759 Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Fri, 15 Dec 2023 16:45:33 +0530 Subject: [PATCH 1/3] daily rounds, clone last default to null --- src/Components/Patient/DailyRounds.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Patient/DailyRounds.tsx b/src/Components/Patient/DailyRounds.tsx index 4105cffb96..8fc7eaeb54 100644 --- a/src/Components/Patient/DailyRounds.tsx +++ b/src/Components/Patient/DailyRounds.tsx @@ -50,7 +50,7 @@ const initForm: any = { admitted_to: "", taken_at: null, rounds_type: "NORMAL", - clone_last: true, + clone_last: null, systolic: null, diastolic: null, pulse: null, From 7274a08df9030e6d5e050ca0099736c2e0d4406d Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Fri, 15 Dec 2023 17:24:18 +0530 Subject: [PATCH 2/3] i don't know what this does --- src/Components/Patient/DailyRounds.tsx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/Components/Patient/DailyRounds.tsx b/src/Components/Patient/DailyRounds.tsx index 8fc7eaeb54..03c3cfc9a7 100644 --- a/src/Components/Patient/DailyRounds.tsx +++ b/src/Components/Patient/DailyRounds.tsx @@ -50,7 +50,7 @@ const initForm: any = { admitted_to: "", taken_at: null, rounds_type: "NORMAL", - clone_last: null, + clone_last: false, systolic: null, diastolic: null, pulse: null, @@ -223,7 +223,7 @@ export const DailyRounds = (props: any) => { RHYTHM_CHOICES.find((i) => i.text === res.data.rhythm)?.id) || "0", temperature: parseFloat(res.data.temperature), - clone_last: res.data.count > 0 ? true : false, + // clone_last: res.data.count > 0 ? true : false, }, }); } @@ -250,12 +250,6 @@ export const DailyRounds = (props: any) => { invalidForm = true; } return; - case "clone_last": - if (state.form.clone_last === null) { - errors[field] = "Please choose a value"; - invalidForm = true; - } - return; default: return; @@ -271,7 +265,7 @@ export const DailyRounds = (props: any) => { if (validForm) { setIsLoading(true); const baseData = { - clone_last: state.form.clone_last, + clone_last: state.form.clone_last ?? false, rounds_type: state.form.rounds_type, patient_category: state.form.patient_category, taken_at: state.form.taken_at @@ -479,7 +473,7 @@ export const DailyRounds = (props: any) => { /> )} - {(state.form.clone_last === false || id) && ( + {(!state.form.clone_last || id) && (
Date: Fri, 15 Dec 2023 17:51:19 +0530 Subject: [PATCH 3/3] skip check for continue form --- src/Components/Patient/DailyRounds.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Components/Patient/DailyRounds.tsx b/src/Components/Patient/DailyRounds.tsx index 03c3cfc9a7..651b278c0d 100644 --- a/src/Components/Patient/DailyRounds.tsx +++ b/src/Components/Patient/DailyRounds.tsx @@ -644,6 +644,7 @@ export const DailyRounds = (props: any) => { goBack()} />