# Inpatient EHR — Allergies The allergies panel records drug and substance allergies for a patient in the context of their inpatient admission. Recorded allergies are displayed prominently on the Admission Profile Dashboard and are checked each time a medication is prescribed. **Entry point:** Admission Profile Dashboard → Admission Panel → **Manage Allergies** **Controller:** `BhtEditController.navigateToManageAllergies()` **Data type:** `ClinicalFindingValue` with `clinicalFindingValueType = PatientAllergy` --- ## Viewing Allergies The Admission Profile Dashboard shows all recorded allergies as amber warning badges in the **Allergies** panel (Column 1). Each badge displays: - The drug/substance name (`itemValue.name`) - A free-text reaction note (`stringValue`), if recorded If no allergies are recorded, the panel shows "No known allergies". --- ## Adding an Allergy 1. From the Admission Profile, click **Manage Allergies**. 2. Search for the drug or substance using the autocomplete field. Allergies are recorded at the **VTM (Virtual Therapeutic Moiety)** level — search for the generic substance, not a branded product. 3. Optionally enter a reaction description in the notes field. 4. Click **Add**. The new allergy is saved as a `ClinicalFindingValue` record linked to the patient and the current admission. --- ## Allergy Check at Prescribing When a prescriber adds a ward medication, encounter medication, or patient medication, the system automatically checks the newly selected drug against all recorded allergies: - **VTM-level match** — if the prescribed drug's VTM (`item.vtm`) matches the VTM of any recorded allergen, an alert fires - **Direct match** — if the prescribed item itself exactly matches a recorded allergen, an alert fires When a match is found, a yellow **ALLERGY ALERT** growl notification is displayed: > ALLERGY ALERT: [Drug Name] matches recorded allergy: [Allergen Name] The prescriber can still save the medication — the alert is advisory, not a hard block. The alert is visible to any user on the same session screen. This check runs in `InpatientClinicalDataController.getAllergyWarning()`, called from: - `addAdmissionWardMedicine()` — ward medications added from the ward medications page - `addEncounterMedicine()` — medications added within a clinical assessment encounter - `addPatientMedicine()` — medications added to the patient-level medicine list > **Implementation note:** VTM-level allergy checking was implemented in [Issue #20831](https://github.com/hmislk/hmis/issues/20831). A planned upgrade ([Issue #20832](https://github.com/hmislk/hmis/issues/20832)) will extend checks to ATC class, VMP, and AMP levels. --- ## Removing an Allergy From the Manage Allergies page, each recorded allergy has a **Remove** button. Removed allergies are retired (soft-deleted) and will no longer appear in the active allergy list or trigger alerts. --- ## Allergy Data Persistence Allergies are stored at the **patient** level (not the admission level), meaning allergies recorded during one admission persist across future admissions for the same patient. The `patientAllergies` list on the Admission Profile reflects all active allergies for that patient regardless of when they were first recorded. --- ## Related Articles - [Inpatient EHR — Overview](Inpatient-EHR-Overview) — full EHR section list - [Inpatient EHR — Ward Medications](Inpatient-EHR-Ward-Medications) — where allergy alerts appear during prescribing - [Inpatient EHR — Discharge Medications](Inpatient-EHR-Discharge-Medications) — allergy check also applies at discharge prescribing - [Inpatient Admission Profile (Dashboard)](Inpatient-Admission-Profile-Dashboard) — allergy badges in Column 1