Skip to content

Commit

Permalink
Fix: Spo2 twice rendering and wrong thresholds (ohcnetwork#9182)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaJ2305 authored Nov 25, 2024
1 parent 2fdffa2 commit fdfc53d
Showing 1 changed file with 17 additions and 43 deletions.
60 changes: 17 additions & 43 deletions src/components/Patient/DailyRounds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ import request from "@/Utils/request/request";
import { formatDateTime } from "@/Utils/utils";
import { scrollTo } from "@/Utils/utils";

import RangeAutocompleteFormField from "../Form/FormFields/RangeAutocompleteFormField";
import TextFormField from "../Form/FormFields/TextFormField";

export const DailyRounds = (props: any) => {
Expand Down Expand Up @@ -704,27 +703,32 @@ export const DailyRounds = (props: any) => {
]}
/>

<RangeAutocompleteFormField
<TextFormField
{...field("ventilator_spo2")}
unit="%"
start={0}
end={100}
step={1}
labelSuffix="%"
type="number"
min={0}
max={100}
thresholds={[
{
value: 0,
className: "text-danger-500",
label: "Low",
label: t("SPO2_LEVEL_SEVERE_HYPOXEMIA"),
},
{
value: 90,
className: "text-primary-500",
label: "Normal",
value: 86,
className: "text-danger-500",
label: t("SPO2_LEVEL_MODERATE_HYPOXEMIA"),
},
{
value: 100,
className: "text-danger-500",
label: "High",
value: 91,
className: "text-warning-400",
label: t("SPO2_LEVEL_MILD_HYPOXEMIA"),
},
{
value: 95,
className: "text-primary-500",
label: t("SPO2_LEVEL_NORMAL"),
},
]}
/>
Expand Down Expand Up @@ -790,36 +794,6 @@ export const DailyRounds = (props: any) => {
]}
/>

<TextFormField
{...field("ventilator_spo2")}
labelSuffix="%"
type="number"
min={0}
max={100}
thresholds={[
{
value: 0,
className: "text-danger-500",
label: t("SPO2_LEVEL_SEVERE_HYPOXEMIA"),
},
{
value: 86,
className: "text-danger-500",
label: t("SPO2_LEVEL_MODERATE_HYPOXEMIA"),
},
{
value: 91,
className: "text-warning-400",
label: t("SPO2_LEVEL_MILD_HYPOXEMIA"),
},
{
value: 95,
className: "text-primary-500",
label: t("SPO2_LEVEL_NORMAL"),
},
]}
/>

<SelectFormField
{...field("rhythm")}
placeholder={t("HEARTBEAT_RHYTHM__UNKNOWN")}
Expand Down

0 comments on commit fdfc53d

Please sign in to comment.