Skip to main content

AbnormalFlag

BasicClinical values<co-abnormal-flag>

AbnormalFlag marks a result as normal, low, high, critical or abnormal with a letter, an icon and a word, never colour alone.

import { AbnormalFlag } from 'health-components';

Examples​

Compact​

Storybook

Full​

Storybook

Usage​

<AbnormalFlag flag="HH" variant="full" />

When to use​

  • Next to a result value, in result tables and in the inbox.
  • Standalone when only the interpretation is shown.

When not to use​

  • Status of a workflow item: StatusTag.
  • Allergy severity: AllergyBadge.

Variants and states​

VariantWhat it is
NNormal, grey with a check.
L / HAmber with down or up arrow.
LL / HHSolid red with warning icon; ClinicalValue always shows the word.
A / AAAbnormal and critical abnormal, for results with no direction.
fullLetter plus the word.

Accessibility​

  • role img with aria-label set to the full word (Critical high).
  • Solid critical colours meet 4.5:1 for the white text.

Do and don't​

  • Do: Use the codes from HL7 v2 OBX-8 / FHIR interpretation.
  • Don't: Invent new letters; map them to these.

Props​

PropTypeDefaultDescription
flag *FlagCode—Interpretation code: 'N' | 'L' | 'H' | 'LL' | 'HH' | 'A' | 'AA' (HL7 v2 OBX-8 / FHIR interpretation); required
variantAbnormalFlagVariant'compact''compact' (letter and icon) | 'full' (letter, icon and word)

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-abnormal-flag>. 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-abnormal-flag flag="…" variant="…" [defaultValue]="defaultValue"></co-abnormal-flag>
KindNameDescription
attributeflagInterpretation code: 'N' | 'L' | 'H' | 'LL' | 'HH' | 'A' | 'AA' (HL7 v2 OBX-8 / FHIR interpretation); required
attributevariant'compact' (letter and icon) | 'full' (letter, icon and word); default 'compact'
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus