Log in Register

Searching in SNOMED CT® using ECL

Expression Constraint Language (ECL) is unique to SNOMED CT and allows users to build computable rules from SNOMED CT’s hierarchy and/or relationship groups. The results from these queries can then be used for purposes such as: patient data analysis, point of care analytics, population analytics and clinical research. Before we describe what an ECL query looks like, here are some common operators you should be familiar with, and what operations they perform:

Operator Name Description
< Descendant of All descendants/children of attribute
<< Descendant or self of All descendants including attribute
 <!  Child of Set of proximal/direct children of attribute
 <<!  Child or self of Set of proximal children including attribute
 >>  Ancestor or self of All ancestors/parents of attribute
 >!  Parent of Set of proximal parents of attribute
 >>!  Parent or self of Set of proximal parents including attribute
 AND  Conjunction  
 OR  Disjunction  
 MINUS  Exclusion  


In ECL, you’ll use one or more of these operators to put together a query to restrict the results of querying within SNOMED CT. For example, a local ski clinic wants to see how many patients have had shoulder dislocations during the past season. By leveraging ECL we can identify all shoulder dislocation diagnosis concepts of interest. Here is how the query would look:

< 64572001 |Disease (disorder)|:
{ 116676008 |Associated morphology (attribute)| = << 87642003 |Dislocation (morphologic abnormality)| AND 363698007 |Finding site (attribute)| = << 85537004 |Glenohumeral joint structure (body structure)| }

Now let’s break it down into its basic parts to help you visualize how the query is formatted:


Once you input the query into the SNOMED CT Browser, this is what you’ll see:

SnomedBrows1JScreenshot of SNOMED CT Browser © 2020 SNOMED International

As you can see in the above query, the domain of ‘disease’ narrows the search in the hierarchy. The concept’s attributes and constraints then curtail the results to limit what super/sub types are being viewed. The result is 42 concepts found. You can then look for these SNOMED CT concepts in the patient encounter records at the ski clinic, to identify the patients that have one of these diagnoses during the past ski season.

To continue with the above scenario, let’s say the researcher wanted to know how many of those patients who had a shoulder dislocation were treated with analgesics. Using an ECL query, we could have SNOMED CT present a list of known analgesics and look for them in the ski clinic’s medication record for the patients with shoulder dislocation. This is what the ECL query in this case would look like:

<<373265006 |Analgesic (substance)|

Here’s what the query brings up on the SNOMED CT Browser – 253 analgesics were returned:
SnomedBrows2JScreenshot of SNOMED CT Browser © 2020 SNOMED International

As you can see, ECL queries can help you group and constrain search results in the browser to only those concepts you’re looking for. By pairing ECL searching with your database, research and analytics can be made easier.

Here are some links you may find useful:

Please contact us if you have questions or suggestions for future topics of discussion, or for help implementing or mapping to standard terminologies.