Skip to content

Commit

Permalink
Corrected Spelling mistake of daily rounds fields: ventilator_fi02 to…
Browse files Browse the repository at this point in the history
… ventilator_fio2 in frontend types definitions and usages
  • Loading branch information
SagarSharma2809 committed Aug 7, 2024
1 parent caa411d commit e0aaac0
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ let reducer = (state: VentilatorParameters.state, action: VentilatorParameters.a
}
| SetFIO2(fio2) => {
...state,
ventilator_fi02: fio2,
ventilator_fio2: fio2,
}
| SetSPO2(spo2) => {
...state,
Expand Down Expand Up @@ -129,11 +129,11 @@ let makePayload = (state: VentilatorParameters.state) => {
payload,
)
DictUtils.setOptionalNumber(
"ventilator_fi02",
"ventilator_fio2",
state.ventilator_oxygen_modality === HIGH_FLOW_NASAL_CANNULA ||
state.ventilator_interface === INVASIVE ||
state.ventilator_interface === NON_INVASIVE
? state.ventilator_fi02
? state.ventilator_fio2
: None,
payload,
)
Expand Down Expand Up @@ -198,7 +198,7 @@ let initialState: VentilatorParameters.t => VentilatorParameters.state = ventila
ventilator_tidal_volume: ventilatorParameters.ventilator_tidal_volume,
ventilator_oxygen_modality_oxygen_rate: ventilatorParameters.ventilator_oxygen_modality_oxygen_rate,
ventilator_oxygen_modality_flow_rate: ventilatorParameters.ventilator_oxygen_modality_flow_rate,
ventilator_fi02: ventilatorParameters.ventilator_fi02,
ventilator_fio2: ventilatorParameters.ventilator_fio2,
ventilator_spo2: ventilatorParameters.ventilator_spo2,
etco2: ventilatorParameters.etco2,
bilateral_air_entry: ventilatorParameters.bilateral_air_entry,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ let silderOptionArray = [
"end": "100",
"interval": "10",
"step": 1.0,
"id": "ventilator_fi02",
"id": "ventilator_fio2",
"min": 21.0,
"max": 60.0,
},
Expand Down Expand Up @@ -190,7 +190,7 @@ let make = (~state: VentilatorParameters.state, ~send: VentilatorParameters.acti
| "ventilator_resp_rate" => state.ventilator_resp_rate
| "ventilator_pressure_support" => state.ventilator_pressure_support
| "ventilator_tidal_volume" => state.ventilator_tidal_volume
| "ventilator_fi02" => state.ventilator_fi02
| "ventilator_fio2" => state.ventilator_fio2
| "ventilator_spo2" => state.ventilator_spo2
| _ => None
}
Expand All @@ -206,7 +206,7 @@ let make = (~state: VentilatorParameters.state, ~send: VentilatorParameters.acti
| "ventilator_resp_rate" => SetRespiratoryRate(s)
| "ventilator_pressure_support" => SetPressureSupport(s)
| "ventilator_tidal_volume" => SetTidalVolume(s)
| "ventilator_fi02" => SetFIO2(s)
| "ventilator_fio2" => SetFIO2(s)
| "ventilator_spo2" => SetSPO2(s)
}
<Slider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ let silderOptionArray = [
"end": "100",
"interval": "10",
"step": 1.0,
"id": "ventilator_fi02",
"id": "ventilator_fio2",
"min": 21.0,
"max": 60.0,
},
Expand Down Expand Up @@ -171,7 +171,7 @@ let make = (~state: VentilatorParameters.state, ~send: VentilatorParameters.acti
| "ventilator_resp_rate" => state.ventilator_resp_rate
| "ventilator_pressure_support" => state.ventilator_pressure_support
| "ventilator_tidal_volume" => state.ventilator_tidal_volume
| "ventilator_fi02" => state.ventilator_fi02
| "ventilator_fio2" => state.ventilator_fio2
| "ventilator_spo2" => state.ventilator_spo2
| _ => None
}
Expand All @@ -187,7 +187,7 @@ let make = (~state: VentilatorParameters.state, ~send: VentilatorParameters.acti
| "ventilator_resp_rate" => SetRespiratoryRate(s)
| "ventilator_pressure_support" => SetPressureSupport(s)
| "ventilator_tidal_volume" => SetTidalVolume(s)
| "ventilator_fi02" => SetFIO2(s)
| "ventilator_fio2" => SetFIO2(s)
| "ventilator_spo2" => SetSPO2(s)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let silderOptionArray = [
"end": "100",
"interval": "10",
"step": 1.0,
"id": "ventilator_fi02",
"id": "ventilator_fio2",
"min": 21.0,
"max": 60.0,
},
Expand Down Expand Up @@ -100,17 +100,17 @@ let make = (~state: VentilatorParameters.state, ~send: VentilatorParameters.acti
|> Array.map(option => {
let value: option<int> = switch option["id"] {
| "ventilator_oxygen_modality_flow_rate" => state.ventilator_oxygen_modality_flow_rate
| "ventilator_fi02" => state.ventilator_fi02
| "ventilator_fio2" => state.ventilator_fio2
| "ventilator_spo2" => state.ventilator_spo2
| _ => None
}
let handleChange: option<int> => VentilatorParameters.action = s =>
switch option["id"] {
| "ventilator_fi02" => SetFIO2(s)
| "ventilator_fio2" => SetFIO2(s)
| "ventilator_spo2" => SetSPO2(s)
}
let className =
option["id"] === "ventilator_fi02" &&
option["id"] === "ventilator_fio2" &&
state.ventilator_oxygen_modality !== HIGH_FLOW_NASAL_CANNULA
? "hidden"
: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ type t = {
ventilator_tidal_volume: option<int>,
ventilator_oxygen_modality_oxygen_rate: option<int>,
ventilator_oxygen_modality_flow_rate: option<int>,
ventilator_fi02: option<int>,
ventilator_fio2: option<int>,
ventilator_spo2: option<int>,
bilateral_air_entry: option<bool>,
etco2: option<int>,
Expand All @@ -173,7 +173,7 @@ let pressureSupport = t => t.ventilator_pressure_support
let tidalVolume = t => t.ventilator_tidal_volume
let oxygenModalityOxygenRate = t => t.ventilator_oxygen_modality_oxygen_rate
let oxygenModalityFlowRate = t => t.ventilator_oxygen_modality_flow_rate
let fio2 = t => t.ventilator_fi02
let fio2 = t => t.ventilator_fio2
let spo2 = t => t.ventilator_spo2

let getParentVentilatorMode = ventilatorModeType => {
Expand Down Expand Up @@ -202,7 +202,7 @@ type state = {
ventilator_tidal_volume: option<int>,
ventilator_oxygen_modality_oxygen_rate: option<int>,
ventilator_oxygen_modality_flow_rate: option<int>,
ventilator_fi02: option<int>,
ventilator_fio2: option<int>,
ventilator_spo2: option<int>,
bilateral_air_entry: option<bool>,
etco2: option<int>,
Expand Down Expand Up @@ -240,7 +240,7 @@ let make = (
~ventilator_tidal_volume,
~ventilator_oxygen_modality_oxygen_rate,
~ventilator_oxygen_modality_flow_rate,
~ventilator_fi02,
~ventilator_fio2,
~ventilator_spo2,
~bilateral_air_entry,
~etco2,
Expand All @@ -256,7 +256,7 @@ let make = (
ventilator_tidal_volume: ventilator_tidal_volume,
ventilator_oxygen_modality_oxygen_rate: ventilator_oxygen_modality_oxygen_rate,
ventilator_oxygen_modality_flow_rate: ventilator_oxygen_modality_flow_rate,
ventilator_fi02: ventilator_fi02,
ventilator_fio2: ventilator_fio2,
ventilator_spo2: ventilator_spo2,
bilateral_air_entry: bilateral_air_entry,
etco2: etco2,
Expand All @@ -277,7 +277,7 @@ let makeFromJs = dailyRound => {
~ventilator_tidal_volume=dailyRound["ventilator_tidal_volume"]->Js.Nullable.toOption,
~ventilator_oxygen_modality_oxygen_rate=dailyRound["ventilator_oxygen_modality_oxygen_rate"]->Js.Nullable.toOption,
~ventilator_oxygen_modality_flow_rate=dailyRound["ventilator_oxygen_modality_flow_rate"]->Js.Nullable.toOption,
~ventilator_fi02=dailyRound["ventilator_fi02"]->Js.Nullable.toOption,
~ventilator_fio2=dailyRound["ventilator_fio2"]->Js.Nullable.toOption,
~ventilator_spo2=dailyRound["ventilator_spo2"]->Js.Nullable.toOption,
~bilateral_air_entry=dailyRound["bilateral_air_entry"]->Js.Nullable.toOption,
~etco2=dailyRound["etco2"]->Js.Nullable.toOption,
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Facility/Consultations/ABGPlots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const ABGPlots = (props: any) => {
"lactate",
"sodium",
"potassium",
"ventilator_fi02",
"ventilator_fio2",
],
},
pathParams: {
Expand Down Expand Up @@ -144,7 +144,7 @@ export const ABGPlots = (props: any) => {
title="FIO2(Ventilator)(%)"
name="fio2"
xData={dates}
yData={yAxisData("ventilator_fi02")}
yData={yAxisData("ventilator_fio2")}
low={21}
high={60}
/>
Expand Down
14 changes: 6 additions & 8 deletions src/Components/Facility/Consultations/PrimaryParametersPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const PrimaryParametersPlot = ({
"insulin_intake_frequency",
"insulin_intake_dose",
"ventilator_spo2",
"ventilator_fi02",
"ventilator_fio2",
"rhythm",
"rhythm_detail",
],
Expand Down Expand Up @@ -195,7 +195,7 @@ export const PrimaryParametersPlot = ({
title="Ventilator FIO2 (%)"
name="fio2"
xData={dates}
yData={yAxisData("ventilator_fi02")}
yData={yAxisData("ventilator_fio2")}
low={21}
high={60}
/>
Expand All @@ -222,11 +222,10 @@ export const PrimaryParametersPlot = ({
<div className="relative flex space-x-3">
<div>
<span
className={`flex h-8 w-8 items-center justify-center rounded-full ring-8 ring-white ${
rhythmDetails.rhythm === 5
className={`flex h-8 w-8 items-center justify-center rounded-full ring-8 ring-white ${rhythmDetails.rhythm === 5
? " text-green-500 "
: " text-red-500 "
}`}
}`}
>
{rhythmDetails.rhythm === 5 ? (
<CareIcon
Expand All @@ -244,11 +243,10 @@ export const PrimaryParametersPlot = ({
<div className="flex min-w-0 flex-1 justify-between space-x-4 pt-1.5">
<div>
<p
className={`text-sm ${
rhythmDetails.rhythm === 5
className={`text-sm ${rhythmDetails.rhythm === 5
? " text-green-500 "
: " text-red-500 "
}`}
}`}
>
<span className="mr-5">
{rhythmDetails.rhythm === 5
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Facility/Consultations/VentilatorPlot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const VentilatorPlot = (props: any) => {
"ventilator_pressure_support",
"ventilator_tidal_volume",
"ventilator_peep",
"ventilator_fi02",
"ventilator_fio2",
"ventilator_spo2",
"etco2",
"bilateral_air_entry",
Expand Down Expand Up @@ -162,7 +162,7 @@ export const VentilatorPlot = (props: any) => {
title="FiO2"
name="FiO2"
xData={dates}
yData={yAxisData("ventilator_fi02")}
yData={yAxisData("ventilator_fio2")}
low={21}
high={60}
/>
Expand Down
52 changes: 26 additions & 26 deletions src/Components/Facility/models.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ export interface PatientConsentModel {
id: string;
type: (typeof CONSENT_TYPE_CHOICES)[number]["id"];
patient_code_status:
| (typeof CONSENT_PATIENT_CODE_STATUS_CHOICES)[number]["id"]
| null;
| (typeof CONSENT_PATIENT_CODE_STATUS_CHOICES)[number]["id"]
| null;
files: FileUploadModel[] | null;
archived: boolean;
archived_by?: UserBareMinimum;
Expand Down Expand Up @@ -286,7 +286,7 @@ export type ABGPlotsFields =
| "lactate"
| "sodium"
| "potassium"
| "ventilator_fi02";
| "ventilator_fio2";

export type ABGPlotsRes = {
ph: string;
Expand All @@ -297,7 +297,7 @@ export type ABGPlotsRes = {
lactate: string;
sodium: string;
potassium: string;
ventilator_fi02: number;
ventilator_fio2: number;
};

export type DialysisPlotsFields =
Expand Down Expand Up @@ -394,7 +394,7 @@ export type PrimaryParametersPlotFields =
| "insulin_intake_frequency"
| "insulin_intake_dose"
| "ventilator_spo2"
| "ventilator_fi02"
| "ventilator_fio2"
| "rhythm"
| "rhythm_detail";

Expand All @@ -411,7 +411,7 @@ export type PrimaryParametersPlotRes = {
insulin_intake_frequency: number;
insulin_intake_dose: string;
ventilator_spo2: number;
ventilator_fi02: number;
ventilator_fio2: number;
rhythm: number;
rhythm_detail: string;
};
Expand All @@ -423,7 +423,7 @@ export type VentilatorPlotFields =
| "ventilator_pressure_support"
| "ventilator_tidal_volume"
| "ventilator_peep"
| "ventilator_fi02"
| "ventilator_fio2"
| "ventilator_spo2"
| "etco2"
| "bilateral_air_entry"
Expand All @@ -437,7 +437,7 @@ export type VentilatorPlotRes = {
ventilator_pressure_support: number;
ventilator_tidal_volume: number;
ventilator_peep: string;
ventilator_fi02: number;
ventilator_fio2: number;
ventilator_spo2: number;
etco2: number;
bilateral_air_entry: boolean;
Expand All @@ -448,31 +448,31 @@ export type VentilatorPlotRes = {
export interface DailyRoundsBody {
page?: number;
fields:
| ABGPlotsFields[]
| DialysisPlotsFields[]
| NeurologicalTablesFields[]
| NursingPlotFields[]
| NutritionPlotsFields[]
| PainDiagramsFields[]
| PressureSoreDiagramsFields[]
| PrimaryParametersPlotFields[]
| VentilatorPlotFields[];
| ABGPlotsFields[]
| DialysisPlotsFields[]
| NeurologicalTablesFields[]
| NursingPlotFields[]
| NutritionPlotsFields[]
| PainDiagramsFields[]
| PressureSoreDiagramsFields[]
| PrimaryParametersPlotFields[]
| VentilatorPlotFields[];
}

export interface DailyRoundsRes {
count: number;
page_size: number;
results: {
[date: string]:
| PressureSoreDiagramsRes
| ABGPlotsRes
| DialysisPlotsRes
| NeurologicalTablesRes
| NursingPlotRes
| NutritionPlotsRes
| PainDiagramsRes
| PrimaryParametersPlotRes
| VentilatorPlotRes;
| PressureSoreDiagramsRes
| ABGPlotsRes
| DialysisPlotsRes
| NeurologicalTablesRes
| NursingPlotRes
| NutritionPlotsRes
| PainDiagramsRes
| PrimaryParametersPlotRes
| VentilatorPlotRes;
};
}

Expand Down

0 comments on commit e0aaac0

Please sign in to comment.