AllergyBanner
Allergies and intolerances with substance, criticality and reaction.
Rule it enforces: "No known allergies" only when a resource records it; an empty list shows "No allergy information recorded", which looks different.
Install
npx shadcn@latest add https://raw.githubusercontent.com/Henrycarto/wardkit/main/public/r/allergy-banner.jsonUsage
import { AllergyBanner } from '@/components/wardkit/allergy-banner';
<AllergyBanner allergies={allergyIntolerances} />Examples
No known allergies, recorded
An AllergyIntolerance with SNOMED 716186003.
No known allergies
Recorded explicitly in the patient's record.
Nothing recorded
An empty list. Different text, icon and border: unknown is not none.
No allergy information recorded
Nothing is recorded either way. Unknown is not the same as no known allergies.
Allergies, with hidden and inactive entries
Penicillin (high criticality), unconfirmed peanut, codeine intolerance, resolved egg, a refuted amoxicillin and an amoxicillin entered in error. The last two are not listed as allergies.
Allergies and intolerances (3)
- Penicillin. High criticality. Reaction: Anaphylaxis (severe).
- Peanut. Low criticality. Unconfirmed. Reaction: Hives (mild).
- Codeine (intolerance). Low criticality. Reaction: Nausea (moderate).
Inactive or resolved (1)
- Eggs (edible). Low criticality. Reaction: Rash.
1 refuted record not listed.
No known drug allergies, next to a drug allergy
Flagged as conflicting.
Allergies and intolerances (1)
Conflicting records: "No known drug allergies" is also recorded. Check the record.
- Penicillin. High criticality. Reaction: Anaphylaxis (severe).
Props
| Prop | Type | Description |
|---|---|---|
| allergies | AllergyIntolerance[] | Every AllergyIntolerance for the patient, including entered-in-error and refuted ones. Required. |
| className? | string | Extra classes for the outer element. |
Clinical rules and sources
- verificationStatus entered-in-error: hidden. refuted: not shown as an allergy (a count is noted).Source: FHIR R4: AllergyIntoleranceVerificationStatus
- clinicalStatus inactive or resolved: listed apart from active allergies.Source: FHIR R4: AllergyIntoleranceClinicalStatus
- A "no known" statement is shown only when a resource carries one of the codes listed below, and exactly as recorded: "No known drug allergies" is never shown as "No known allergies".Source: IPS 2.0.1: Allergies and Intolerances value set; IPS 1.1.0: Absent or Unknown Allergies
- An empty list, or the IPS code "no-allergy-info", shows "No allergy information recorded" with a dashed border and a question icon: unknown is not the same as none.Source: IPS 1.1.0: ConceptMap absence to SNOMED (no-allergy-info is unmatched)
- A "no known" statement next to an active allergy in the same category is flagged as conflicting. "No known allergies" conflicts with any active allergy.Source: FHIR R4: AllergyIntolerance.category
- Unconfirmed entries are shown and labelled unconfirmed. Missing criticality says "Criticality not recorded".Source: FHIR R4: AllergyIntolerance
No-known-allergy codes
IPS 2.0.1 includes SNOMED CT 716186003 and every concept under it in its allergies and intolerances value set. That is seven concepts in SNOMED CT International 2025-02-01, all active, checked through the HL7 terminology server. Recognising only four would show "No known latex allergy" as an allergy to latex.
| Code | Meaning | Used for |
|---|---|---|
| 409137002 | No known drug allergies | Under 716186003; conflicts with medication allergies |
| 428197003 | No known insect allergies | Under 716186003 |
| 428607008 | No known environmental allergies | Under 716186003; conflicts with environment allergies |
| 429625007 | No known food allergies | Under 716186003; conflicts with food allergies |
| 716186003 | No known allergies | Parent concept; conflicts with any active allergy |
| 716220001 | No known animal allergies | Under 716186003 |
| 1003774007 | No known latex allergy | Under 716186003 |
| Code | Meaning | Used for |
|---|---|---|
| no-known-allergies | No known allergies | Same as the SNOMED code it maps to |
| no-known-medication-allergies | No known medication allergies | Same as the SNOMED code it maps to |
| no-known-food-allergies | No known food allergies | Same as the SNOMED code it maps to |
| no-known-environmental-allergies | No known environmental allergies | Same as the SNOMED code it maps to |
| no-allergy-info | No information about allergies | Shown as "No allergy information recorded" |