Skip to main content

PainScale

ComplexInpatient nursing<co-pain-scale>

PainScale records pain on the 0 to 10 numeric scale, a faces scale for children, or FLACC for patients who cannot self-report, with severity band and goal check.

import { PainScale } from 'health-components';

Examples​

Numeric Severe​

Storybook

Faces​

Storybook

Flacc Complete​

Storybook

Flacc Incomplete​

Storybook

No Pain Read Only​

Storybook

Usage​

<PainScale defaultValue={7} goal={3} reassess="30 min" />

When to use​

  • Pain assessment and reassessment after PRN analgesia.

When not to use​

  • Neonates: use NIPS or N-PASS.
  • Sedated ICU patients: CPOT or BPS.

Variants and states​

VariantWhat it is
numeric0 to 10 buttons.
facesSix faces at 0, 2, 4, 6, 8, 10 with words. Drawn faces only; licensed Wong-Baker artwork is not bundled.
FLACCFive categories scored 0 to 2, total 0 to 10.
bandsNo pain, Mild 1 to 3, Moderate 4 to 6, Severe 7 to 10.
goalAbove or at the patient goal.
single modePass one entry in modes to hide the switch.
readOnlyNot selectable.

Accessibility​

  • Every scale is a radiogroup; faces carry text, not only a drawing.
  • Score and band in a polite live region.

Do and don't​

  • Do: Record the patient goal and compare against it.
  • Don't: Use FLACC for a patient who can rate their own pain.

Props​

PropTypeDefaultDescription
modesPainScaleMode[]['numeric', 'faces', 'flacc']Scales offered; one entry hides the switch
modePainScaleMode—Controlled scale
defaultModePainScaleMode'numeric'Initial scale (uncontrolled)
onModeChange(mode: PainScaleMode) => void—Called when the scale changes
valuenumber | null—Controlled numeric or faces score, 0 to 10 (null = not scored)
defaultValuenumbernoneInitial numeric or faces score, 0 to 10 (uncontrolled)
defaultFlaccRecord<string, number>{}Initial FLACC answers: option index (0 to 2) per category face, legs, activity, cry, consol
goalnumbernonePatient pain goal (0 to 10)
reassessstring'60 min'Reassessment window shown when above goal
readOnlybooleanfalseNot selectable
onChange(e: PainScaleChange) => void—Called with the scale and score when a score is picked (FLACC: once all five categories are scored)
titlestring'Pain Assessment'Card title
subtitlestringnonePatient line
rangeContextRangeContextId'inpatient'Accepted for API consistency with the nursing set; the pain score is never flagged

Also accepts native attributes, including defaultChecked, autoFocus, plus className and event handlers on the root element.

Angular, Vue and HTML​

Register the elements once (Angular guide), then use <co-pain-scale>. Attributes take strings; arrays and objects are set as properties (Angular [prop], Vue :prop) or as JSON attributes. Callbacks are DOM events with the value in event.detail.

Angular template
<co-pain-scale mode="…" default-mode="…" [modes]="modes" (co-mode-change)="onModeChange($event.detail)"></co-pain-scale>
KindNameDescription
property / JSON attributemodesScales offered; one entry hides the switch; default ['numeric', 'faces', 'flacc']
attributemodeControlled scale
attributedefault-mode / defaultModeInitial scale (uncontrolled); default 'numeric'
attributevalueControlled numeric or faces score, 0 to 10 (null = not scored)
attributedefault-value / defaultValueInitial numeric or faces score, 0 to 10 (uncontrolled); default none
property / JSON attributedefault-flacc / defaultFlaccInitial FLACC answers: option index (0 to 2) per category face, legs, activity, cry, consol; default {}
attributegoalPatient pain goal (0 to 10); default none
attributereassessReassessment window shown when above goal; default '60 min'
attributeread-only / readOnlyNot selectable; default false
attributetitleCard title; default 'Pain Assessment'
attributesubtitlePatient line; default none
attributerange-context / rangeContextAccepted for API consistency with the nursing set; the pain score is never flagged; default 'inpatient'
attributedefault-checked / defaultChecked
attributeauto-focus / autoFocus
eventco-mode-changeCalled when the scale changes (React: onModeChange)
eventco-changeCalled with the scale and score when a score is picked (FLACC: once all five categories are scored) (React: onChange)