Reassessing Allergy Severity Mapping in FHIR

I’ve observed that the severity for certain allergies is indicated as UNABLE-TO-ASSESS . Here’s a summary of my investigation into identifying the root cause.

When saving an allergy for a patient, we collect the following information:

  1. Allergen
  2. Reactions
  3. Severity of worst reaction (mild, moderate, severe)
  4. comment

If we look into a FHIR resource, there’s two fields related to severity:

AllergyIntolerance.criticality:

  • This element describes the criticality of the allergy or intolerance.
  • Possible values include:
    • low (Low Risk): The reaction is not likely to result in a life-threatening situation.
    • high (High Risk): The reaction has the potential to be life-threatening.
    • unable-to-assess (Unable to Assess Risk): The criticality of the reaction cannot be determine

AllergyIntolerance.reaction.severity:

  • This element provides information about the severity of reactions.
  • It is part of the AllergyIntolerance.reaction element
  • Possible values:
    • mild
    • moderate
    • severe

When going through the source code of the FHIR module, I realised that this is how we translate an allergy in the DB to a FHIR resources.

  1. AllergyIntolerance.criticality:

    if severity_of_worst_reaction is mild ⇒ map to low

    else if severe ⇒ map to high

    else ⇒ map to unable-to-assess (so the moderate maps to this which results displaying as unable-to-assess in the UI)

  2. AllergyIntolerance.reaction.severity:

    the value of severity_of_worst_reaction will assigned to this.

We should reconsider the criticality; the current method of linking severity to criticality might be a bit misleading. One solution could be to add a custom field in the allergy form specifically for indicating criticality. Let me know what you think.

Relevant links:

cc: @grace @ibacher @dkigen

1 Like

@pmanko @burke @akanter @janflowers Ignoring the simple fix we need to do for this table (the Severity Column should obviously be fetching the “severity” api call, not the “criticality” one): Does this seem quite odd to you that our FHIR layer is mapping “SAME-AS” the “severity” and “criticality” of allergic reactions? Is this standard practice with FHIR…? I get that they are related but I don’t know that I would say for certain they’re equivalent.

1 Like

This is clearly a mistaken mapping. There’s a bit of a mismatch here between FHIR’s model and OpenMRS’s, specifically, in FHIR severity is a property of each recorded adverse reaction, i.e., it’s a property of the event and not the allergy itself. OpenMRS is storing the severity as a property of the allergy itself. I’ll assume we have good reason for this, e.g., that what is clinically relevant is the worst reaction a patient has had to a substance.

Best thing here would be to introduce an extension and not map data to either the criticality field or the reaction.severity field, since populating either of these leads to semantically incorrect results.

1 Like

For the record, the original intent of OpenMRS’ allergy.severity_concept_id was to record what FHIR has modeled as AllergyIntolerance.criticality (i.e., how serious is the allergy/intolerance… not a specific event). Typically, this is a judgement call (some reactions, like anaphylaxis imply this should be high, but sometimes a patient’s symptoms or history can vary in reliability or level of concern), so inferring AllergyIntolerance.criticality (as @jayasanka describes) appear inappropriate.

2 Likes

I am new to openMRS and would like to know if there is any place to record the type of allergic reaction. The Gell-Coombs classification.

Type I: Immediate Hypersensitivity (Anaphylactic Reaction) Mechanism: IgE antibodies are produced in response to an allergen. Upon re-exposure, these antibodies trigger the release of histamine and other inflammatory mediators from mast cells and basophils. Examples: Anaphylaxis, allergic asthma, hay fever, hives (urticaria), food allergies, drug allergies. Onset: Rapid (within minutes). Symptoms: Swelling, difficulty breathing, itching, rash, wheezing, anaphylactic shock. Type II: Cytotoxic Hypersensitivity Mechanism: IgG or IgM antibodies bind to antigens on the surface of target cells, leading to cell destruction via complement activation or phagocytosis. Examples: Hemolytic anemia, thrombocytopenia, transfusion reactions, Goodpasture’s syndrome, some forms of drug allergies (e.g., penicillin-induced hemolytic anemia). Onset: Minutes to hours. Symptoms: Varies depending on the specific condition (e.g., anemia, bleeding, organ-specific damage). Type III: Immune Complex-Mediated Hypersensitivity Mechanism: Immune complexes (antigen-antibody complexes) form in the bloodstream and are deposited in tissues, triggering inflammation through complement activation and neutrophil recruitment. Examples: Serum sickness, systemic lupus erythematosus (SLE), rheumatoid arthritis, post-streptococcal glomerulonephritis, Arthus reaction. Onset: Hours to days. Symptoms: Localized or systemic inflammation, fever, joint pain, rash, glomerulonephritis. Type IV: Delayed-Type Hypersensitivity (Cell-Mediated) Mechanism: T-cells (not antibodies) mediate the immune response. Upon re-exposure to the allergen, sensitized T-cells release cytokines, leading to inflammation. Examples: Contact dermatitis (e.g., poison ivy, nickel allergy), tuberculosis skin test reaction, chronic transplant rejection, drug reactions (e.g., Stevens-Johnson syndrome). Onset: Delayed (24–72 hours). Symptoms: Skin rash, swelling, erythema, induration.