Expression Constraint Language (ECL) High-level Reference

A brief overview of the SNOMED CT Expression Constraint Language (ECL), which is based on the post coordination syntax. The complete specification can be found at http://snomed.org/ecl.

  • All expression constraints are evaluated with respect to a specific version of SNOMED CT.
  • An expression constraint always returns a set of codes (zero or more). That is, no duplicates.

    ArgumentDescription
  • conceptId
  • An SCTID optionally including a term surrounded by | symbols.
    307082005 | Ability to process information |
  • arg
  • An expression or conceptId. Bracketting may be required to avoid ambiguity.
    11687002
    << 73211009
    (<< 73211009 . 363698007)
    Category FunctionDescriptionExample
    Basic conceptIdThe set containing the single concept with the specified conceptId. 11687002
    Any
    *
    All active and inactive concepts. Any
    *
    MemberOf conceptId
    ^ conceptId
    The referencedComponents that are active members of the Reference Set identified by the conceptId.

    This may include both active and inactive concepts, but will not include concepts that were once members of the Reference Set but are no longer.

    MemberOf 32570481000036109
    MemberOf 32570481000036109 |Emergency department diagnosis reference set|
    ^ 32570481000036109
    Hierarchy DescendantOf conceptId
    DescendantOrSelfOf conceptId
    < conceptId
    << conceptId
    All descendants of the concept with the specified conceptId.

    The DescendantOrSelfOf and << forms also include the specified conceptId.

    DescendantOf 80146002
    DescendantOf 404684003 |Clinical finding|
    DescendantOrSelfOf 73211009 |Diabetes mellitus|
    < 80146002
    < 404684003 |Clinical finding|
    << 73211009 |Diabetes mellitus|
    ChildOf conceptId
    ChildOrSelfOf conceptId
    <! conceptId
    <<! conceptId
    The immediate children of the concept with the specified conceptId.

    The ChildOrSelfOf and <<! forms also include the specified conceptId.

    ChildOf 404684003
    ChildOrSelfOf 404684003
    <! 404684003 |Clinical finding|
    <<! 404684003 |Clinical finding|
    AncestorOf conceptId
    AncestorOrSelfOf conceptId
    > conceptId
    >> conceptId
    All ancestors of the concept with the specified conceptId.

    The AncestorOrSelfOf and >> forms also include the specified conceptId.

    AncestorOf 80146002
    AncestorOf 40541001 |Acute pulmonary edema|
    AncestorOrSelfOf 73211009 |Diabetes mellitus|
    > 80146002
    > 40541001 |Acute pulmonary edema|
    >> 73211009 |Diabetes mellitus|
    ParentOf conceptId
    >! conceptId
    The immediate parents of the concept with the specified conceptId. ParentOf 40541001 |Acute pulmonary edema|
    >! 40541001 |Acute pulmonary edema|
    Combined Constraints arg AND argThe intersection of each of the sets returned by the arguments. 174036004 AND < 80146002
    < 19829001 |Disorder of lung| AND < 301867009 |Edema of trunk|
    arg OR argThe set-union of each of the sets returned by the arguments. 11687002 OR 73211009
    < 19829001 |Disorder of lung| OR < 301867009 |Edema of trunk|
    arg MINUS argThe members of the first set that are not also in the second set. < 73211009 MINUS 11687002
    < 19829001 |Disorder of lung| MINUS < 301867009 |Edema of trunk|
    Relationships arg1 : conceptId = arg3Attributes: All concepts matching arg1 that also have an attribute with the name matching arg2 and value matching arg3. < 19829001 |Disorder of lung| :
    116676008 |Associated morphology| = 79654002 |Edema|

    < 19829001 |Disorder of lung| :
    116676008 |Associated morphology| = << 79654002 |Edema|

    < 404684003 |Clinical finding| :
    363698007 |Finding site| = << 39057004 |Pulmonary valve structure| ,
    116676008 |Associated morphology| = << 415582006 |Stenosis|

    * : 246075003 |Causative agent| = 387517004 |Paracetamol|
    arg1 : arg2 = arg3Attribute Operators: As above, using attribute hierarchy. << 404684003 |Clinical finding| :
    << 47429007 |Associated with| = << 267038008 |Edema|
    arg1 : {
      arg2 = arg3,
      arg4 = arg5
    }
    Attribute Groups: As above, but also respecting role grouping. < 404684003 |Clinical finding| :
    { 363698007 |Finding site| = << 39057004 |Pulmonary valve structure| ,
    116676008 |Associated morphology| = << 415582006 |Stenosis| },
    { 363698007 |Finding site| = << 53085002 |Right ventricular structure| ,
    116676008 |Associated morphology| = << 56246009 |Hypertrophy| }
    arg1 :
      arg2 = ( arg3 : arg4 = arg5 )
    Nested Attributes: As above, but with nesting. < 404684003 |Clinical finding| :
    47429007 |Associated with| = (< 404684003 |Clinical finding| :
    116676008 |Associated morphology| = << 55641003 |Infarct| )
    arg1 . arg2"Reversed" Attributes: match the values of attribute arg2 for each of the concepts matching arg1 < 125605004 |Fracture of bone| . 363698007 |Finding site|
    Cardinality arg1 : [num..num] arg2 = arg3Attribute Cardinality: As above, but with upper/lower bounds on number of attribute matches. < 404684003 |Clinical finding| :
    [1..1] 363698007 |Finding site| = < 91723000 |Anatomical structure|