diff --git a/src/Components/CriticalCareRecording/Pain/CriticalCare__PainInputModal.res b/src/Components/CriticalCareRecording/Pain/CriticalCare__PainInputModal.res index 5626adff45..0946e7d816 100644 --- a/src/Components/CriticalCareRecording/Pain/CriticalCare__PainInputModal.res +++ b/src/Components/CriticalCareRecording/Pain/CriticalCare__PainInputModal.res @@ -55,11 +55,13 @@ let make = ( } }) - let getStatus = (min, minText, max, maxText, val) => { - switch (val >= min, val <= max) { - | (true, true) => ("Normal", "#059669") - | (true, false) => (maxText, "#DC2626") - | _ => (minText, "#DC2626") + let getLabels = val => { + if val < 4 { + ("Low", "green") + } else if val < 8 { + ("Mild", "orange") + } else { + ("High", "red") } } @@ -78,7 +80,7 @@ let make = ( ~top=getModalPosition()["top"], (), )} - className="transform max-w-[350px] rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-fit"> + className="transform max-w-[350px] rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-fit overflow-hidden">
@@ -86,48 +88,67 @@ let make = ( {str("Region: ")} {str(Pain.regionToString(state.region))}
-
-
- { - let value = s->Belt.Int.fromString - switch value { - | Some(value) => setState(prev => {...prev, scale: value}) - | None => setState(prev => {...prev, scale: 0}) - } - }} - getLabel={getStatus(2.0, "Low", 4.0, "High")} - hasError={ValidationUtils.isInputInRangeInt( - 0, - 5, - Belt.Float.toString(painScale)->Belt.Int.fromString, - )} - /> -
- -