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
Faces
Flacc Complete
Flacc Incomplete
No Pain Read Only
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
| Variant | What it is |
|---|---|
| numeric | 0 to 10 buttons. |
| faces | Six faces at 0, 2, 4, 6, 8, 10 with words. Drawn faces only; licensed Wong-Baker artwork is not bundled. |
| FLACC | Five categories scored 0 to 2, total 0 to 10. |
| bands | No pain, Mild 1 to 3, Moderate 4 to 6, Severe 7 to 10. |
| goal | Above or at the patient goal. |
| single mode | Pass one entry in modes to hide the switch. |
| readOnly | Not 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
| Prop | Type | Default | Description |
|---|---|---|---|
modes | PainScaleMode[] | ['numeric', 'faces', 'flacc'] | Scales offered; one entry hides the switch |
mode | PainScaleMode | — | Controlled scale |
defaultMode | PainScaleMode | 'numeric' | Initial scale (uncontrolled) |
onModeChange | (mode: PainScaleMode) => void | — | Called when the scale changes |
value | number | null | — | Controlled numeric or faces score, 0 to 10 (null = not scored) |
defaultValue | number | none | Initial numeric or faces score, 0 to 10 (uncontrolled) |
defaultFlacc | Record<string, number> | {} | Initial FLACC answers: option index (0 to 2) per category face, legs, activity, cry, consol |
goal | number | none | Patient pain goal (0 to 10) |
reassess | string | '60 min' | Reassessment window shown when above goal |
readOnly | boolean | false | Not selectable |
onChange | (e: PainScaleChange) => void | — | Called with the scale and score when a score is picked (FLACC: once all five categories are scored) |
title | string | 'Pain Assessment' | Card title |
subtitle | string | none | Patient line |
rangeContext | RangeContextId | '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>
| Kind | Name | Description |
|---|---|---|
| property / JSON attribute | modes | Scales offered; one entry hides the switch; default ['numeric', 'faces', 'flacc'] |
| attribute | mode | Controlled scale |
| attribute | default-mode / defaultMode | Initial scale (uncontrolled); default 'numeric' |
| attribute | value | Controlled numeric or faces score, 0 to 10 (null = not scored) |
| attribute | default-value / defaultValue | Initial numeric or faces score, 0 to 10 (uncontrolled); default none |
| property / JSON attribute | default-flacc / defaultFlacc | Initial FLACC answers: option index (0 to 2) per category face, legs, activity, cry, consol; default {} |
| attribute | goal | Patient pain goal (0 to 10); default none |
| attribute | reassess | Reassessment window shown when above goal; default '60 min' |
| attribute | read-only / readOnly | Not selectable; default false |
| attribute | title | Card title; default 'Pain Assessment' |
| attribute | subtitle | Patient line; default none |
| attribute | range-context / rangeContext | Accepted for API consistency with the nursing set; the pain score is never flagged; default 'inpatient' |
| attribute | default-checked / defaultChecked | |
| attribute | auto-focus / autoFocus | |
| event | co-mode-change | Called when the scale changes (React: onModeChange) |
| event | co-change | Called with the scale and score when a score is picked (FLACC: once all five categories are scored) (React: onChange) |