Skip to main content

AllergyList

ComplexClinical<co-allergy-list>

AllergyList is the Allergies card: each allergy with type, reaction, severity and status, plus the NKA and not-reviewed states.

import { AllergyList } from 'health-components';

Examples​

States​

Storybook

No Known Allergies​

Storybook

Not Reviewed​

Storybook

Read Only​

Storybook

Usage​

<AllergyList items={allergies} reviewed="10/09/2026 by Lisa Chen RN" />

When to use​

  • Chart Allergies section, intake review.

When not to use​

  • Banners: AllergyBadge.

Variants and states​

VariantWhat it is
listRows with severity tags.
NKAEmpty array: green No Known Allergies.
not reviewedundefined: amber warning before prescribing.
readOnlyNo actions.

Accessibility​

  • Severity has icon and word.

Do and don't​

  • Do: Record "Entered in Error" instead of deleting.
  • Don't: Treat an empty list as "no allergies" when nobody asked.

Props​

PropTypeDefaultDescription
itemsAllergyItem[]—Allergies. `[]` shows No Known Allergies (NKA); `undefined` means not reviewed and shows a warning. Array<{substance, type?, reaction?, severity, onset?, status?}> | [] | undefined
reviewedstringnone (Not reviewed this visit)Review date and person ("10/09/2026 by Lisa Chen RN")
readOnlybooleanfalseHides Mark Reviewed, Add Allergy and the row menus
onMarkReviewed() => voidnoneMark Reviewed clicked
onAdd() => voidnoneAdd Allergy clicked
onItemAction(action: AllergyAction, item: AllergyItem) => voidnoneA row menu item was chosen

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-allergy-list>. 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-allergy-list reviewed="…" read-only [items]="items" (co-mark-reviewed)="onMarkReviewed($event.detail)"></co-allergy-list>
KindNameDescription
property / JSON attributeitemsAllergies. `[]` shows No Known Allergies (NKA); `undefined` means not reviewed and shows a warning. Array<{substance, type?, reaction?, severity, onset?, status?}> | [] | undefined; default undefined
attributereviewedReview date and person ("10/09/2026 by Lisa Chen RN"); default none (Not reviewed this visit)
attributeread-only / readOnlyHides Mark Reviewed, Add Allergy and the row menus; default false
attributedefault-checked / defaultChecked
property / JSON attributedefault-value / defaultValue
attributeauto-focus / autoFocus
eventco-mark-reviewedMark Reviewed clicked; default none (React: onMarkReviewed)
eventco-addAdd Allergy clicked; default none (React: onAdd)
eventco-item-actionA row menu item was chosen; default none (React: onItemAction)