Skip to content

Commit

Permalink
i don't know what this does
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Dec 15, 2023
1 parent a273d25 commit 7274a08
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/Components/Patient/DailyRounds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
},
});
}
Expand All @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -479,7 +473,7 @@ export const DailyRounds = (props: any) => {
/>
)}

{(state.form.clone_last === false || id) && (
{(!state.form.clone_last || id) && (
<div className="grid grid-cols-1 gap-x-6 md:grid-cols-2">
<TextAreaFormField
{...field("physical_examination_info")}
Expand Down

0 comments on commit 7274a08

Please sign in to comment.