Search



You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

In this section, we illustrate how filters can be applied to a set of reference set members to restrict the matching values.

Overview

Member filters provide the ability to filter the rows of a reference set, based on the value of specific fields in the reference set. These filters are specified inside double curly braces, and begin with the letter "M".

Member Filters

To apply a member filter to one or more reference sets, the fields of those reference sets are matched against specified criteria. Only reference set members whose field values match the given criteria will be included in the results.

For example, the following expression constraint will match all referencedComponentIds (i.e. SNOMED CT concept id) from the active  447562003 | ICD-10 complex map reference set|  rows, which map to the ICD-10 code "J45.9". When applied to the July 2021 international edition, this will match 59 concepts, including  195967001 | Asthma| 707447008 | Exacerbation of severe persistent asthma (disorder)|  and  401193004 | Asthma confirmed (situation)| .

    ^  447562003 |ICD-10 complex map reference set|  {{ M mapTarget = "J45.9" }}
Multiple field constraints can be applied within a reference set member filter. For example, the following expression constraint will return the referencedComponentId from the  447562003 | ICD-10 complex map reference set|  rows, which have a mapGroup of "2", a mapPriority of "1" and a mapTarget of "J45.9".
    ^  447562003 |ICD-10 complex map reference set|  {{ M mapGroup = #2, mapPriority = #1, mapTarget = "J45.9" }}
Other comparison operators may also be used, when defining field criteria. The available operators depend on the field's datatype, as shown in the table below.


Data type

Comparison Operators
Brief syntaxLong syntax
SCTID / Expression= , !== , != , NOT = , <>
Integer / Decimal= , != , <= , < , >= , >= , != , NOT = , <> , <= , < , >= , >
String= , !== , != , NOT = , <>
Boolean= , !== , != , NOT = , <>
Time= , != , <= , < , >= , >= , != , NOT = , <> , <= , < , >= , >

In addition, reference set fields of type 'string' may be filtered using the same word-prefix-any-order and wildcard techniques used by the description term filters. For example, the following expression constraint will match all referencedComponentId from the active  447562003 | ICD-10 complex map reference set|  rows that have a mapGroup not equal to 2, a mapPriority less than 2, and a mapTarget that starts with the letter "J".

    ^  447562003 |ICD-10 complex map reference set|  {{ M mapGroup != #2, mapPriority < #2, mapTarget = wild:"J*" }}
Member filters can also be used in combination with the memberOf function to support the selection of other fields of a reference set (see 6.1 Simple Expression Constraints). For example, the following expression constraint returns the active SNOMED CT concept that is considered to be the same as the inactive concept  67415000 | Hay asthma|
    ^ [targetComponentId]  900000000000527005 |SAME AS association reference set|  {{ M referencedComponentId =  67415000 |Hay asthma|  }}
For more information on the use of reference set field names in ECL, please refer to Appendix E - Reference Set Fields.

For additional ways of specifying queries over the historical association reference sets, please refer to 6.11 History Supplements.


Feedback
  • No labels