ECL Query Procedure

The eclQuery lists the conceptId and preferred term for each concept that conforms to a specified .


  1. The expression constraints supported do not cover the full ECL specification but are restricted as described below.
  2. This procedure will only run in MySQL version 8.0 or later. It uses some function which are not available in earlier versions (including the widely used MySQL version 5.7).



Example Use of eclQuery Procedure



SQL Call to Procedure

call snap_eclQuery(p_ecl);

ParameterDescriptionData typeExamples

p_ecl

The ECL query texttext

(< 19829001 |disorder of lung|) OR (< 301867009 |edema of trunk|)

'(< 19829001 |disorder of lung|) MINUS (< 301867009 |edema of trunk|)'

'>> 40541001 |Acute pulmonary edema|'

'>39057004 |pulmonary valve|'

'>!39057004 |pulmonary valve|'

Example Procedure Call


call snap_eclQuery('< 19829001 |disorder of lung|:116676008 |Associated morphology| = 40829002 |Acute edema|');


Result

conceptIdterm
10519008Acute pulmonary oedema due to fumes AND/OR vapours
40541001Acute pulmonary oedema
61233003Silo-fillers' disease
233706004Drug-induced acute pulmonary oedema
233709006Toxic pulmonary oedema
233710001Chemical-induced pulmonary oedema
233711002Oxygen-induced pulmonary oedema
360371003Acute cardiac pulmonary oedema
10674871000119105Pulmonary oedema caused by chemical fumes

Expression Constraint Feature Support and Limitations

The following notes provide a brief summary of the extent to which this procedure supports evaluation of expression constraints. For a full and detailed understanding of SNOMED CT expression constraints see the specification of the SNOMED CT Expression Constraint Language.

ECL Operators and Examples

ECL Operator

Summary

Example

Symbol

Name

<

Descendant of

The set of all subtypes of the given concept

< 404684003 |Clinical finding|

<<

Descendant or self of

The set of all subtypes of the given concept plus the concept itself

<< 73211009 |Diabetes mellitus|

>

Ancestor of

The set of all supertypes of the given concept

> 40541001 |Acute pulmonary edema|

>>

Ancestor or self of

The set of all supertypes of the given concept plus the concept itself

>> 40541001 |Acute pulmonary edema|

<!

Child of

The set of all children of the given concept

<! 195967001 |Asthma|

>!Parent ofThe set of all parents of the given concept>! 195967001 |Asthma|

^

Member of

The set of referenced components in the given reference set

^ 733990004 |Nursing activities reference set|

*

Any

Any concept in the given SNOMED CT edition

*

:

Refinement

Only those concepts whose defining relationships match the given attribute value pairs

< 404684003 |clinical finding|: 116676008 |associated morphology| = *

AND

Conjunction

Only those concepts in both sets

(< 19829001 |disorder of lung|) AND (< 301867009 |edema of trunk|)

OR

Disjunction

Any concept that belongs to either set

(< 19829001 |disorder of lung|) OR (< 301867009 |edema of trunk|)

MINUS

Exclusion

Concepts in the first set that do not belong to the second set

(< 19829001 |disorder of lung|) MINUS (< 301867009 |edema of trunk|)

Additional Notes on Limitations of the ECL Query Procedure

The following notes outline the extent to which this procedure supports the SNOMED CT expression constraints and highlights some of the most significant limitations of this procedure.

One or more constraints can be specified.

If present the refinement constraint must consist of one or more attribute-value-constraint pairs.

If more than one constraint is specified:

Summary of Limitations of ECL Support for this Procedure

The Procedure does not support:

The Procedure also requires that: