IsolationBadge
BasicInpatient flow
<co-isolation-badge>IsolationBadge names the transmission-based precautions a patient is on, so staff put on the right protection before they enter the room.
import { IsolationBadge } from 'health-components';
Examples
Showcase
Rule Out
Compact
Usage
<IsolationBadge type="contact-plus" organism="C. diff" />
<IsolationBadge type="airborne" organism="TB" pending compact size="sm" />
When to use
- On the bed board, census rows, patient banner and door signs, wherever a person decides whether to enter a room.
When not to use
- Allergies (AllergyBadge) or code status; those are different risks.
- Standard precautions on every patient: it is hidden by default because it applies to everyone.
Variants and states
| Variant | What it is |
|---|---|
| contact | Gown and gloves. MRSA, VRE, ESBL. |
| contact-plus | Contact plus soap and water hand hygiene. C. difficile, norovirus. |
| droplet | Surgical mask within 6 feet. Influenza, pertussis. |
| airborne | N95 and a negative-pressure room. TB, measles, varicella. |
| airborne-contact | Both, for example disseminated zoster. |
| neutropenic | Protective precautions for the patient. |
| standard | Hidden unless showStandard. |
| organism | Organism in brackets. |
| pending | Rule-out: on precautions while the test is pending. |
| compact | Drops the "Isolation:" prefix in dense rows. |
| size sm | For bed tiles and table cells. |
Accessibility
- The precaution is in words, never colour alone; the shield icon is decorative.
- The tooltip names the protection to wear.
Do and don't
- Do: Show the organism when it is known.
- Do: Mark rule-out precautions as pending.
- Don't: Abbreviate to colour dots only.
- Don't: Show "Standard" on every patient.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
type * | IsolationType | — | 'contact' | 'contact-plus' | 'droplet' | 'airborne' | 'airborne-contact' | 'neutropenic' | 'standard'; required |
organism | string | none | Organism, shown in brackets ('MRSA') |
pending | boolean | false | Rule-out: on precautions while the test is pending |
compact | boolean | false | Drops the "Isolation:" prefix in dense rows |
size | 'sm' | 'md' | 'md' | 'sm' | 'md' |
showStandard | boolean | because it applies to everyone); default false | Shows 'standard' (hidden by |
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-isolation-badge>. 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-isolation-badge type="…" organism="…" [defaultValue]="defaultValue"></co-isolation-badge>
| Kind | Name | Description |
|---|---|---|
| attribute | type | 'contact' | 'contact-plus' | 'droplet' | 'airborne' | 'airborne-contact' | 'neutropenic' | 'standard'; required |
| attribute | organism | Organism, shown in brackets ('MRSA'); default none |
| attribute | pending | Rule-out: on precautions while the test is pending; default false |
| attribute | compact | Drops the "Isolation:" prefix in dense rows; default false |
| attribute | size | 'sm' | 'md'; default 'md' |
| attribute | show-standard / showStandard | Shows 'standard' (hidden by default because it applies to everyone); default false |
| attribute | default-checked / defaultChecked | |
| property / JSON attribute | default-value / defaultValue | |
| attribute | auto-focus / autoFocus |