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
Full
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
| Variant | What it is |
|---|---|
| N | Normal, grey with a check. |
| L / H | Amber with down or up arrow. |
| LL / HH | Solid red with warning icon; ClinicalValue always shows the word. |
| A / AA | Abnormal and critical abnormal, for results with no direction. |
| full | Letter 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
| Prop | Type | Default | Description |
|---|---|---|---|
flag * | FlagCode | — | Interpretation code: 'N' | 'L' | 'H' | 'LL' | 'HH' | 'A' | 'AA' (HL7 v2 OBX-8 / FHIR interpretation); required |
variant | AbnormalFlagVariant | '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>
| Kind | Name | Description |
|---|---|---|
| attribute | flag | Interpretation code: 'N' | 'L' | 'H' | 'LL' | 'HH' | 'A' | 'AA' (HL7 v2 OBX-8 / FHIR interpretation); required |
| attribute | variant | 'compact' (letter and icon) | 'full' (letter, icon and word); default 'compact' |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus |