Skip to main content

VitalSign

ComplexClinical<co-vital-sign>

VitalSign is one vital tile: label, value, unit, High or Low flag (critical shaded), trend sparkline and time taken.

import { VitalSign } from 'health-components';

Examples​

Flags​

Storybook

Critical​

Storybook

Normal​

Storybook

Usage​

<VitalSign label="Blood pressure" value="152/94" unit="mmHg" flag="H" trend={[132, 138, 145, 152]} taken="10:12 AM" />

When to use​

  • Vitals panels and rooming.

When not to use​

  • Lab values: LabResultTable.

Variants and states​

VariantWhat it is
normalPlain.
H / LBadge with arrow and word.
HH / LLCritical: shaded tile.
trendSparkline.

Accessibility​

  • Flag has a word and arrow, not only colour.

Do and don't​

  • Do: Units always shown.
  • Don't: Colour-only flags.

Props​

PropTypeDefaultDescription
label *string—Vital name ("Blood pressure"); required
value *string | number—Reading ("152/94"); required
unitstringnoneUnit ("mmHg")
flagResultFlagnone'H' | 'L' | 'HH' | 'LL'; critical flags shade the tile
trendnumber[]nonenumber[]: earlier readings, oldest first, drawn as a sparkline
takenstringnoneTime taken or a note ("10:12 AM", "52nd percentile")

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

Angular, Vue and HTML​

Register the elements once (Angular guide), then use <co-vital-sign>. 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-vital-sign label="…" unit="…" [value]="value"></co-vital-sign>
KindNameDescription
attributelabelVital name ("Blood pressure"); required
property / JSON attributevalueReading ("152/94"); required
attributeunitUnit ("mmHg"); default none
attributeflag'H' | 'L' | 'HH' | 'LL'; critical flags shade the tile; default none
property / JSON attributetrendnumber[]: earlier readings, oldest first, drawn as a sparkline; default none
attributetakenTime taken or a note ("10:12 AM", "52nd percentile"); default none
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus