Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daily Rounds: Updated consciousness levels choices to MEWS #6435

Merged
merged 5 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ let reducer = (state, action) => {
| SetConsciousnessLevel(consciousnessLevel) => {
...state,
dirty: true,
consciousnessLevel: consciousnessLevel,
consciousnessLevel,
}
| SetConsciousnessLevelDetails(consciousnessLevelDetails) => {
...state,
dirty: true,
consciousnessLevelDetails: consciousnessLevelDetails,
consciousnessLevelDetails,
}
| SetLeftPupilSize(leftPupilSize) => {
...state,
Expand All @@ -83,17 +83,17 @@ let reducer = (state, action) => {
| SetLeftPupilSizeDetails(leftPupilSizeDetails) => {
...state,
dirty: true,
leftPupilSizeDetails: leftPupilSizeDetails,
leftPupilSizeDetails,
}
| SetLeftPupilLightReaction(leftPupilLightReaction) => {
...state,
dirty: true,
leftPupilLightReaction: leftPupilLightReaction,
leftPupilLightReaction,
}
| SetLeftPupilLightReactionDetails(leftPupilLightReactionDetails) => {
...state,
dirty: true,
leftPupilLightReactionDetails: leftPupilLightReactionDetails,
leftPupilLightReactionDetails,
}
| SetRightPupilSize(rightPupilSize) => {
...state,
Expand All @@ -103,17 +103,17 @@ let reducer = (state, action) => {
| SetRightPupilSizeDetails(rightPupilSizeDetails) => {
...state,
dirty: true,
rightPupilSizeDetails: rightPupilSizeDetails,
rightPupilSizeDetails,
}
| SetRightPupilLightReaction(rightPupilLightReaction) => {
...state,
dirty: true,
rightPupilLightReaction: rightPupilLightReaction,
rightPupilLightReaction,
}
| SetRightPupilLightReactionDetails(rightPupilLightReactionDetails) => {
...state,
dirty: true,
rightPupilLightReactionDetails: rightPupilLightReactionDetails,
rightPupilLightReactionDetails,
}
| SetGlasgowEyeOpen(glasgowEyeOpen) => {...state, glasgowEyeOpen: Some(glasgowEyeOpen)}
| SetGlasgowVerbalResponse(glasgowVerbalResponse) => {
Expand All @@ -129,22 +129,22 @@ let reducer = (state, action) => {
| SetLimbResponseUpperExtremityRight(limbResponseUpperExtremityRight) => {
...state,
dirty: true,
limbResponseUpperExtremityRight: limbResponseUpperExtremityRight,
limbResponseUpperExtremityRight,
}
| SetLimbResponseUpperExtremityLeft(limbResponseUpperExtremityLeft) => {
...state,
dirty: true,
limbResponseUpperExtremityLeft: limbResponseUpperExtremityLeft,
limbResponseUpperExtremityLeft,
}
| SetLimbResponseLowerExtremityRight(limbResponseLowerExtremityRight) => {
...state,
dirty: true,
limbResponseLowerExtremityRight: limbResponseLowerExtremityRight,
limbResponseLowerExtremityRight,
}
| SetLimbResponseLowerExtremityLeft(limbResponseLowerExtremityLeft) => {
...state,
dirty: true,
limbResponseLowerExtremityLeft: limbResponseLowerExtremityLeft,
limbResponseLowerExtremityLeft,
}

| SetSaving => {...state, saving: true}
Expand Down Expand Up @@ -265,7 +265,7 @@ let renderConsciousnessLevel = (
) => {
<div className="my-10">
<div className=" text-2xl font-bold my-2"> {str("Level Of Consciousness")} </div>
<div className="flex md:flex-row flex-col md:space-y-0 space-y-2 space-x-0 md:space-x-4">
<div className="grid lg:grid-cols-2 grid-cols-1 lg:space-y-0 space-y-2 space-x-0">
{Js.Array.map(consciousnessLevel => {
<Radio
key={label ++ NeurologicalMonitoring.consciousnessLevelToString(consciousnessLevel)}
Expand All @@ -274,17 +274,15 @@ let renderConsciousnessLevel = (
checked={consciousnessLevel === input}
onChange={_ => onInputChange(consciousnessLevel)}
/>
}, [Alert, Drowsy, Stuporous, Comatose, CannotBeAssessed])->React.array}
}, [
Unresponsive,
Alert,
RespondsToPain,
RespondsToVoice,
AgitatedOrConfused,
OnsetOfAgitationAndConfusion,
])->React.array}
</div>
{ReactUtils.nullUnless(
<CriticalCare__Description
name={`${name}_reaction_description`}
label={`${label} Reaction Description`}
text={inputDetails}
onChange={event => onInputDetailsChange(event)}
/>,
input === NeurologicalMonitoring.CannotBeAssessed,
)}
</div>
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ let make = (
NeurologicalMonitoring.consciousnessLevel(neurologicalMonitoring),
),
)}
{renderOptionalDescription(
"Consciousness Level Reaction Description",
NeurologicalMonitoring.consciousnessLevelDetails(neurologicalMonitoring),
)}
<div className="flex md:flex-row flex-col mt-2">
<div className="px-4 py-2 border bg-gray-100 m-1 rounded-lg shadow md:w-1/2 w-full">
{title("Left Pupil")}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
type consciousnessLevel = Alert | Drowsy | Stuporous | Comatose | CannotBeAssessed | Unknown
type consciousnessLevel =
| Unresponsive
| RespondsToPain
| RespondsToVoice
| Alert
| AgitatedOrConfused
| OnsetOfAgitationAndConfusion
| Unknown
type lightReaction = Brisk | Sluggish | Fixed | CannotBeAssessed | Unknown
type limpResponse = Strong | Moderate | Weak | Flexion | Extension | NONE_ | Unknown

Expand Down Expand Up @@ -68,11 +75,12 @@ let make = (

let makeConsciousnessLevel = consciousnessLevel => {
switch consciousnessLevel {
| "UNRESPONSIVE" => Unresponsive
| "RESPONDS_TO_PAIN" => RespondsToPain
| "RESPONDS_TO_VOICE" => RespondsToVoice
| "ALERT" => Alert
| "DROWSY" => Drowsy
| "STUPOROUS" => Stuporous
| "COMATOSE" => Comatose
| "CANNOT_BE_ASSESSED" => CannotBeAssessed
| "AGITATED_OR_CONFUSED" => AgitatedOrConfused
| "ONSET_OF_AGITATION_AND_CONFUSION" => OnsetOfAgitationAndConfusion
| "UNKNOWN"
| _ =>
Unknown
Expand All @@ -81,11 +89,12 @@ let makeConsciousnessLevel = consciousnessLevel => {

let encodeConConsciousnessLevel = consciousnessLevel => {
switch consciousnessLevel {
| Unresponsive => "UNRESPONSIVE"
| RespondsToPain => "RESPONDS_TO_PAIN"
| RespondsToVoice => "RESPONDS_TO_VOICE"
| Alert => "ALERT"
| Drowsy => "DROWSY"
| Stuporous => "STUPOROUS"
| Comatose => "COMATOSE"
| CannotBeAssessed => "CANNOT_BE_ASSESSED"
| AgitatedOrConfused => "AGITATED_OR_CONFUSED"
| OnsetOfAgitationAndConfusion => "ONSET_OF_AGITATION_AND_CONFUSION"
| Unknown => "UNKNOWN"
}
}
Expand Down Expand Up @@ -150,11 +159,12 @@ let lightReactionToString = lightReaction => {

let consciousnessLevelToString = consciousnessLevel => {
switch consciousnessLevel {
| Unresponsive => "Unresponsive"
| RespondsToPain => "Responds to Pain"
| RespondsToVoice => "Responds to Voice"
| Alert => "Alert"
| Drowsy => "Drowsy"
| Stuporous => "Stuporous"
| Comatose => "Comatose"
| CannotBeAssessed => "Cannot be assessed"
| AgitatedOrConfused => "Agitated or Confused"
| OnsetOfAgitationAndConfusion => "Onset of Agitation and Confusion"
| Unknown => "Unknown"
}
}
Expand Down
13 changes: 7 additions & 6 deletions src/Components/Facility/Consultations/NeurologicalTables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,11 @@ export const NeurologicalTable = (props: any) => {
const LOC_OPTIONS = [
{ id: 0, value: "Unknown" },
{ id: 5, value: "Alert" },
{ id: 10, value: "Drowsy" },
{ id: 15, value: "Stuporous" },
{ id: 20, value: "Comatose" },
{ id: 25, value: "Cannot Be Assessed" },
{ id: 10, value: "Responds to Voice" },
{ id: 15, value: "Responds to Pain" },
{ id: 20, value: "Unresponsive" },
{ id: 25, value: "Agitated or Confused" },
{ id: 30, value: "Onset of Agitation and Confusion" },
];

const REACTION_OPTIONS = [
Expand Down Expand Up @@ -304,9 +305,9 @@ export const NeurologicalTable = (props: any) => {
{locData.map((x: any, i: any) => (
<div
key={`loc_${i}`}
className="min-w-max-content flex flex-col divide-x divide-gray-200"
className="min-w-max-content flex flex-col divide-x divide-gray-200"
>
<div className="border-r bg-gray-50 px-2 py-3 text-center text-xs font-medium leading-4 text-gray-700">
<div className="whitespace-nowrap border-r bg-gray-50 px-2 py-3 text-center text-xs font-medium leading-4 text-gray-700">
{x.date}
</div>
<div className="whitespace-nowrap bg-white px-6 py-4 text-center text-sm leading-5 text-gray-700">
Expand Down
Loading