Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Projects

Page tree
Skip to end of metadata
Go to start of metadata

Summary of notes from http://notes.openmrs.org/Design-Forum-2013-05-29

The allergy data model (added in 1.7) covers the fields we need for HL7 2.6 compatibility. The allergy UI in the legacy web application is basically a placeholder, and not worth preserving.


What developers need:

  • Get list of allergies for a patient
  • Add/remove allergies (remove as in soft-delete)
  • check a med against the allergy list and get back some set of alerts
    • check allergies when a new med is added
    • check meds when a new allergy is added
  • given an allergen, have the API suggest a broader group ("are you sure you didn't mean Penicillins instead of Amoxicillin?")

What users need:

  • When ordering meds, show the list of allergies (and warn about contra-indications)
  • Show allergies on patient summary (along with problem list and active orders)
  • Show allergies on dashboard
  • Add/Remove allergies
  • Indicate/Remove No Known Allergies (NKA) status of a patient 

Allergens and concepts mapping Allergen Reaction Concepts Mapping

Jonathan: you can define a short list of ~50 items that encompass 98% of what you'll see. (The following is from BWH.)

  • Drugs
    • ACE Inhibitor 

    • ARB (Angiotensin Receptor Blocker) 

    • Aspirin 

    • Cephalosporin 

    • Codeine 

    • Erythromycin  

    • Heparin 

    • Morphine 

    • NSAIDs 

    • Penicillin 

    • Statin 

    • Sulfa (Sulfonamide Antibiotics)

  • Foods
    • Beef 

    • Caffeine

    • Chocolate 

    • Dairy Products 

    • Eggs 

    • Fish 

    • Milk Protein 

    • Peanuts 

    • Shellfish 

    • Soy 

    • Strawberries 

    • Wheat

  • Environmental
    • Bee stings
    • Dust
    • Latex
    • Mold
    • Pollen
    • Ragweed
    • Tape

There will be other option as well for any allergens not covered in the preset options. For Drug category caregivers will have to perform a drug lookup to associate this allergen to a drug and drug class. 

Jonathan's clinical notes:

1. Regardless of whether these are true biochemical allergies, almost all clinicians lump together all drugs that are hazardous to an individual patient, and they are commonly if incorrectly known as "allergies" because that's the word the patients know and hear. So we are including major intolerance groups in this list.
2. Products specifically containing aspirin
3. Drugs to be flagged and avoided in patients with G6PD deficiency, such as aspirin, dapsone, etc.  Note that aspirin itself actually is a member of three of the groups listed here.
4. There are technically three different groups of opiates for allergy purposes, but most of the ones used fall into the phenanthrene group (codeine, oxycodone, morphine, hydromorphone, etc.).  The outliers are fentanyl, meperidine, methadone and propoxyphene -- but there's still some cross-reactivity.

Possible values for Reactions 

Short list of common reactions (but there's a long tail of uncommon ones):

  • Anaphylaxis
  • Anemia
  • Angioedema
  • Arrhythmia
  • Bronchospasm
  • Cough
  • Diarrhea
  • Dystonia
  • Fever
  • Flushing
  • GI Upset
  • Headaches
  • Hepatotoxicity
  • Hives
  • Hypotension
  • Itching
  • Mental Status Change
  • Musculoskeletal pain
  • Myalgia
  • Unknown

The UI should push you to this short list, but give you an option for "other".

Possible data model changes

Current data model:

CREATE TABLE `active_list` (
  `active_list_id` int(11) NOT NULL AUTO_INCREMENT,
  `active_list_type_id` int(11) NOT NULL,
  `person_id` int(11) NOT NULL,
  `concept_id` int(11) NOT NULL,
  `start_obs_id` int(11) DEFAULT NULL,
  `stop_obs_id` int(11) DEFAULT NULL,
  `start_date` datetime NOT NULL,
  `end_date` datetime DEFAULT NULL,
  `comments` varchar(255) DEFAULT NULL,
  `creator` int(11) NOT NULL,
  `date_created` datetime NOT NULL,
  `voided` tinyint(1) NOT NULL DEFAULT '0',
  `voided_by` int(11) DEFAULT NULL,
  `date_voided` datetime DEFAULT NULL,
  `void_reason` varchar(255) DEFAULT NULL,
  `uuid` char(38) NOT NULL,
  PRIMARY KEY (`active_list_id`),
  KEY `user_who_voided_active_list` (`voided_by`),
  KEY `user_who_created_active_list` (`creator`),
  KEY `active_list_type_of_active_list` (`active_list_type_id`),
  KEY `person_of_active_list` (`person_id`),
  KEY `concept_active_list` (`concept_id`),
  KEY `start_obs_active_list` (`start_obs_id`),
  KEY `stop_obs_active_list` (`stop_obs_id`),
  CONSTRAINT `active_list_type_of_active_list` FOREIGN KEY (`active_list_type_id`) REFERENCES `active_list_type` (`active_list_type_id`),
  CONSTRAINT `concept_active_list` FOREIGN KEY (`concept_id`) REFERENCES `concept` (`concept_id`),
  CONSTRAINT `person_of_active_list` FOREIGN KEY (`person_id`) REFERENCES `person` (`person_id`),
  CONSTRAINT `start_obs_active_list` FOREIGN KEY (`start_obs_id`) REFERENCES `obs` (`obs_id`),
  CONSTRAINT `stop_obs_active_list` FOREIGN KEY (`stop_obs_id`) REFERENCES `obs` (`obs_id`),
  CONSTRAINT `user_who_created_active_list` FOREIGN KEY (`creator`) REFERENCES `users` (`user_id`),
  CONSTRAINT `user_who_voided_active_list` FOREIGN KEY (`voided_by`) REFERENCES `users` (`user_id`)
)

CREATE TABLE `active_list_allergy` (
  `active_list_id` int(11) NOT NULL AUTO_INCREMENT,
  `allergy_type` varchar(50) DEFAULT NULL,
  `reaction_concept_id` int(11) DEFAULT NULL,
  `severity` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`active_list_id`),
  KEY `reaction_allergy` (`reaction_concept_id`),
  CONSTRAINT `reaction_allergy` FOREIGN KEY (`reaction_concept_id`) REFERENCES `concept` (`concept_id`)
)

An allergy is an active list.


Proposed additional adds: 

From Jonathan: As per the design discussion at the design call on Wednesday July 16, 2014: there are a few additional fields that we need in the allergy structure, mainly in the specification of an allergen (the thing to which you are allergic).  Broadly:

allergy {
           (this is a summary outlined by Burke in one of our meetings)
           allergen
           reaction [coded concept from a picklist or Other/free text]
           severity [I’m not sure this is useful in practice, but willing to go along with it]
           onset date
           comments
}

allergen {
   type (ordinal: drug, food, substance)
(for drugs – sometimes the user will choose a drug class, sometimes only a specific drug, and sometimes they will choose a specific drug but we will still want to infer a drug class):
   drug class
           concept id [where it comes from: picklist, inferred from a drug that user entered, or Other/free text]
           text name [if Other is used]
   drug
           concept id [where it comes from: picklist, drug dictionary lookup or Other]
           text name [if Other is used]
(for foods):
   concept ID [picklist]
   text name [text]
(for other substances):
   concept ID [picklist]
   text name [text]
}

  

 

 

 

  • No labels

1 Comment

  1. The components of an allergy are something like:

    • allergen concept
    • reaction
    • severity
    • onset date
    • comments

    The API needs to handle the special cases of not having any allergy information and "no known allergies", which is clinically significantly different from not having any allergy information for a patient.  Some systems will store "no known allergies" as a special allergen.  While we might allow for a concept like this, the API should never allow someone to have three allergies, one of which is "no known allergies."  A more robust approach would be to make "allergy information missing" and "no known allergies" as two distinct states with no allergens.  Then the API could provide an empty list of allergies for no known allergies and behave differently (e.g., throw an exception) when allergy information is missing.