diff --git a/src/Components/Patient/DailyRounds.tsx b/src/Components/Patient/DailyRounds.tsx index 321536e80f5..ba9492bb04f 100644 --- a/src/Components/Patient/DailyRounds.tsx +++ b/src/Components/Patient/DailyRounds.tsx @@ -1,7 +1,7 @@ import { navigate } from "raviger"; import dayjs from "dayjs"; -import { lazy, useCallback, useEffect, useState } from "react"; +import { lazy, useCallback, useEffect, useState} from "react"; import { CONSCIOUSNESS_LEVEL, PATIENT_CATEGORIES, @@ -45,6 +45,7 @@ import { EncounterSymptomsBuilder } from "../Symptoms/SymptomsBuilder"; import { FieldLabel } from "../Form/FormFields/FormField"; import useAuthUser from "../../Common/hooks/useAuthUser"; import CheckBoxFormField from "../Form/FormFields/CheckBoxFormField"; +import { scrollTo } from "../../Utils/utils"; const Loading = lazy(() => import("../Common/Loading")); @@ -231,6 +232,7 @@ export const DailyRounds = (props: any) => { if (!state.form[field]) { errors[field] = "Please select a category"; invalidForm = true; + scrollTo('patientCategory'); } return; case "bp": { @@ -238,6 +240,7 @@ export const DailyRounds = (props: any) => { if (error) { errors.bp = error; invalidForm = true; + scrollTo('bloodPressure'); } return; } @@ -524,6 +527,7 @@ export const DailyRounds = (props: any) => { {...field("patient_category")} required label="Category" + id="patientCategory" /> @@ -589,7 +593,7 @@ export const DailyRounds = (props: any) => { <>

Vitals

- +