diff --git a/src/Common/constants.tsx b/src/Common/constants.tsx index 610309057d0..7b4bc7387ee 100644 --- a/src/Common/constants.tsx +++ b/src/Common/constants.tsx @@ -699,6 +699,12 @@ export const RESOURCE_FILTER_ORDER: Array = [ { id: 4, text: "-modified_date", desc: "DESC Modified Date" }, ]; +export const HEARTBEAT_RHYTHM_CHOICES = [ + "REGULAR", + "IRREGULAR", + "UNKNOWN", +] as const; + export const NURSING_CARE_PROCEDURES = [ "personal_hygiene", "positioning", @@ -760,12 +766,12 @@ export const RHYTHM_CHOICES = [ { id: 10, text: "IRREGULAR", desc: "Irregular" }, ] as const; -export const LOCATION_BED_TYPES: Array = [ +export const LOCATION_BED_TYPES = [ { id: "ISOLATION", name: "Isolation" }, { id: "ICU", name: "ICU" }, { id: "BED_WITH_OXYGEN_SUPPORT", name: "Bed with oxygen support" }, { id: "REGULAR", name: "Regular" }, -]; +] as const; export const ASSET_META_TYPE = [ { id: "CAMERA", text: "Camera(ONVIF)" }, diff --git a/src/Components/LogUpdate/CriticalCarePreview.tsx b/src/Components/LogUpdate/CriticalCarePreview.tsx index 00cbb47f69e..67ad693ff48 100644 --- a/src/Components/LogUpdate/CriticalCarePreview.tsx +++ b/src/Components/LogUpdate/CriticalCarePreview.tsx @@ -268,6 +268,14 @@ export default function CriticalCarePreview(props: Props) { }, ]} /> + +

Pain Scale

diff --git a/src/Components/LogUpdate/Sections/Vitals.tsx b/src/Components/LogUpdate/Sections/Vitals.tsx index 796575e4145..1fa4b3f3aac 100644 --- a/src/Components/LogUpdate/Sections/Vitals.tsx +++ b/src/Components/LogUpdate/Sections/Vitals.tsx @@ -1,3 +1,4 @@ +import { useTranslation } from "react-i18next"; import { celsiusToFahrenheit, fahrenheitToCelsius, @@ -10,11 +11,12 @@ import RadioFormField from "../../Form/FormFields/RadioFormField"; import RangeFormField from "../../Form/FormFields/RangeFormField"; import TextAreaFormField from "../../Form/FormFields/TextAreaFormField"; import { FieldChangeEvent } from "../../Form/FormFields/Utils"; -import { DailyRoundsModel } from "../../Patient/models"; import PainChart from "../components/PainChart"; import { LogUpdateSectionMeta, LogUpdateSectionProps } from "../utils"; +import { HEARTBEAT_RHYTHM_CHOICES } from "../../../Common/constants"; const Vitals = ({ log, onChange }: LogUpdateSectionProps) => { + const { t } = useTranslation(); const handleBloodPressureChange = (event: FieldChangeEvent) => { const bp = { ...(log.bp ?? {}), @@ -27,11 +29,14 @@ const Vitals = ({ log, onChange }: LogUpdateSectionProps) => { return (
-

Blood Pressure

- MAP: {(log.bp?.mean && properRoundOf(log.bp.mean)) || "--"} +

{t("blood_pressure")}

+ + {t("map_acronym")}:{" "} + {(log.bp?.mean && properRoundOf(log.bp.mean)) || "--"} +
{ valueDescriptions={rangeValueDescription({ low: 99, high: 139 })} /> { />
- SpO2 - - } + label={t("spo2")} name="ventilator_spo2" //TODO: ensure whether this should be ventilator_spo2 itself or spo2 onChange={(c) => onChange({ ventilator_spo2: c.value })} value={log.ventilator_spo2} @@ -69,7 +70,7 @@ const Vitals = ({ log, onChange }: LogUpdateSectionProps) => { valueDescriptions={rangeValueDescription({ low: 89 })} /> onChange({ temperature: c.value })} value={log.temperature} @@ -87,7 +88,7 @@ const Vitals = ({ log, onChange }: LogUpdateSectionProps) => { ]} /> onChange({ resp: c.value })} value={log.resp} @@ -99,9 +100,9 @@ const Vitals = ({ log, onChange }: LogUpdateSectionProps) => { />
-

Pain

+

{t("pain")}

- Mark region and intensity of pain + {t("pain_chart_description")}
{ />
onChange({ pulse: c.value })} value={log.pulse} @@ -122,36 +123,30 @@ const Vitals = ({ log, onChange }: LogUpdateSectionProps) => { { till: 40, className: "text-red-500", - text: "Bradycardia", + text: t("bradycardia"), }, { till: 100, className: "text-green-500", - text: "Normal", + text: t("normal"), }, { className: "text-red-500", - text: "Tachycardia", + text: t("tachycardia"), }, ]} /> c.label} - optionValue={(c) => c.value || ""} + options={HEARTBEAT_RHYTHM_CHOICES} + optionDisplay={(c) => t(`HEARTBEAT_RHYTHM__${c}`)} + optionValue={(c) => c} value={log.rhythm} - onChange={(c) => - onChange({ rhythm: c.value as DailyRoundsModel["rhythm"] }) - } + onChange={(c) => onChange({ rhythm: c.value ?? undefined })} /> onChange({ rhythm_detail: c.value })} diff --git a/src/Components/Patient/models.tsx b/src/Components/Patient/models.tsx index 5387e457e9e..7676d294b4c 100644 --- a/src/Components/Patient/models.tsx +++ b/src/Components/Patient/models.tsx @@ -2,6 +2,7 @@ import { ConsultationModel, PatientCategory } from "../Facility/models"; import { PerformedByModel } from "../HCX/misc"; import { CONSCIOUSNESS_LEVEL, + HEARTBEAT_RHYTHM_CHOICES, HumanBodyRegion, INSULIN_INTAKE_FREQUENCY_OPTIONS, LIMB_RESPONSE_OPTIONS, @@ -12,7 +13,6 @@ import { PressureSoreTissueTypeOptions, RATION_CARD_CATEGORY, RESPIRATORY_SUPPORT, - RHYTHM_CHOICES, VENTILATOR_MODE_OPTIONS, } from "../../Common/constants"; @@ -311,7 +311,7 @@ export type IPressureSore = { }; export interface DailyRoundsModel { spo2?: number; - rhythm?: (typeof RHYTHM_CHOICES)[number]["text"]; + rhythm?: (typeof HEARTBEAT_RHYTHM_CHOICES)[number]; rhythm_detail?: string; bp?: BloodPressure; pulse?: number; diff --git a/src/Locale/en/Common.json b/src/Locale/en/Common.json index 656791c3788..aec40c872d5 100644 --- a/src/Locale/en/Common.json +++ b/src/Locale/en/Common.json @@ -184,6 +184,7 @@ "GENDER__1": "Male", "GENDER__2": "Female", "GENDER__3": "Non-binary", + "normal": "Normal", "done": "Done", "view": "View", "rename": "Rename", diff --git a/src/Locale/en/LogUpdate.json b/src/Locale/en/LogUpdate.json index 319a87bd8d8..080e2fc979a 100644 --- a/src/Locale/en/LogUpdate.json +++ b/src/Locale/en/LogUpdate.json @@ -52,5 +52,22 @@ "NURSING_CARE_PROCEDURE__chest_tube_care": "Chest Tube Care", "NURSING_CARE_PROCEDURE__tracheostomy_care": "Tracheostomy Care", "NURSING_CARE_PROCEDURE__stoma_care": "Stoma Care", - "NURSING_CARE_PROCEDURE__catheter_care": "Catheter Care" + "NURSING_CARE_PROCEDURE__catheter_care": "Catheter Care", + "HEARTBEAT_RHYTHM__REGULAR": "Regular", + "HEARTBEAT_RHYTHM__IRREGULAR": "Irregular", + "HEARTBEAT_RHYTHM__UNKNOWN": "Unknown", + "heartbeat_rhythm": "Heartbeat Rhythm", + "heartbeat_description": "Heartbeat Description", + "blood_pressure": "Blood Pressure", + "map_acronym": "M.A.P.", + "systolic": "Systolic", + "diastolic": "Diastolic", + "temperature": "Temperature", + "resipiratory_rate": "Respiratory Rate", + "pain": "Pain", + "pain_chart_description": "Mark region and intensity of pain", + "pulse": "Pulse", + "bradycardia": "Bradycardia", + "tachycardia": "Tachycardia", + "spo2": "SpO₂" } \ No newline at end of file