Seeking assistance to determine allergy category and type using ECL

Hi,

We are a TIF Framework partner of the NHS and seeking for help in framing the ECL query to determine allergy-intolerance-categories i.e. Food, Medication, Environment, and Biologic along with determine Type I.e. Allergy and Intolerance.

Prompt response must be appreciated.

Regards,

1 Like

Please can you give some clarity as to what you are trying to do, with maybe some examples.

I am assuming you are using SNOMED CT as you have mentioned ECL. Are you wanting help writing the ECL query?

Glad to hear from you, and wishing you a very Happy New Year.

In our system, we have structured allergies into two dimensions: Type and Category.

Type

We classify each entry as either:

  • Allergy — e.g.
    91936005 (Allergy to penicillin (finding))

  • Adverse reaction / Intolerance — e.g.
    292954005 (Penicillin adverse reaction (disorder))

Category

Each record is also mapped to one of the following categories:

  • Food — e.g. 91935009 (Allergy to peanut (finding))

  • Medication — e.g. 91936005 (Allergy to penicillin (finding))

  • Environment — e.g. 30091000 (Allergy to pollen (finding))

  • Biologic — e.g. 422290000 (Allergic disorder of skin (disorder))

Our goal is that when a SNOMED code is entered, the system should automatically determine:

  1. The Type (Allergy vs Intolerance)

  2. The Category (Food, Medication, Environment, or Biologic)

using appropriate ECL expressions.

We are following the official SNOMED guidance for this implementation:

So far, we have been able to reliably determine the Type using the following ECL logic:

All Allergies
(<< Code AND << 419511003)

All Intolerances / Non-allergic reactions
(<< Code AND << 281647001)

However, we are still working on a robust approach to consistently derive the Category (Food, Medication, Environment, Biologic).

I hope this clarifies our current implementation and the challenge we are addressing.

Kind regards,

Hello @mkumar

Happy New Year to you too.

Sorry I am not able to advise on how to do the mapping to category as I am not clinical.

However reading the SNOMED documentation I noticed that there is an allergy demonstration application. I have noticed that if you enter 91936005|Allergy to penicillin| most of the fields in the application are filled in including “Substance Category”. In the top right hand corner of this application is a circle with an "i” in it which is a link to the code in Github, here is the link: GitHub - IHTSDO/sct-implementation-demonstrator.

I would recommend looking at the code and seeing how SNOMED have done the mapping. However I cannot guarantee that SNOMED have done it correct either.

Also it might be worth giving feedback in the SNOMED documentation that it would be useful to include documentation on how to map to Substance Category.

Kind Regards

1 Like

Thanks for your prompt response. Much appreciated.

Let us look into this once.

Hi @bill.lush

Thanks for your kind patience.

We have now reviewed and analysed the approach in detail and identified the following ECL expressions. These expressions work for many SNOMED CT concepts; however, they do not cover all cases, as outlined below.

ECL Expressions Identified

To determine type:

http://snomed.info/sct?fhir_vs=ecl/> 417532002 |Allergy to fish| AND (609433001 |Hypersensitivity disposition| OR 782197009 |Intolerance to substance|)

To determine causative agent:

http://snomed.info/sct?fhir_vs=ecl/>417532002 |Allergy to fish| . 246075003 |Causative agent (attribute)|

To determine category:

http://snomed.info/sct?fhir_vs=ecl/> 735971005 |Fish| AND (762766007 |Edible substance| OR 115668003 |Biological substance (substance)| OR 410942007 |Drug or medicament (substance)| OR 57795002 |Chemical element|)

Identified Gaps

The above approach does not work for the following SNOMED CT concepts:

1. 251401005 — D-Xylose intolerance

2. 292157002 — Chenodeoxycholic acid adverse reaction

3. 340519003 — Lysine intolerance

4. 247994001 — Noise intolerance

These concepts appear to follow different modelling patterns, which prevents them from being captured by the current ECL expressions.

Request for Guidance

Could you please advise on how we can extend or modify the ECL logic so that it reliably covers all relevant allergy, intolerance, and adverse reaction concepts, including the examples above?

Your guidance would be greatly appreciated.

Kind regards,

@bill.lush In addition to the above, we are able to reliably restrict the overall allergy-related concepts using the following ECL:

<< 418038007 |Propensity to adverse reactions to substance| 
OR 
<< 420134006 |Propensity to adverse reaction (finding)|

Hello @mkumar

With respect to your query below:

<< 418038007 |Propensity to adverse reactions to substance|
OR
<< 420134006 |Propensity to adverse reaction (finding)|

The first code (418038007|Propensity to adverse reactions to substance|) is inactive in the latest version of SNOMED CT UK edition. So the ECL below will not return any data other than the code itself.

<<418038007|Propensity to adverse reactions to substance|

Hello @mkumar

I am sorry, but I cannot advise on ECL as it would require me to give clinical advice.

Thanks for your beautiful remarks. No worries, we will connect with our clinician accordingly.