In this section, we illustrate how filters can be applied to a set of reference set members to restrict the matching values.
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".
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" (as a word prefix). 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)| .6.8 Description Filters.
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".
|Brief syntax||Long 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".
For additional ways of specifying queries over the historical association reference sets, please refer to 6.11 History Supplements.
Module filters enable an expression constraint to match on only those rows of a reference set that belong to a specified module. Module filters use the keyword "moduleId" with a concept reference that is < 900000000000443000 |Module| .
For example, the expression constraint below matches all members of the 900000000000534007 | Module dependency reference set| that belong to an Australian maintained module.
Effective time filters enable an expression constraint to match on only those rows of a reference set with an effectiveTime that matches the specified criteria.
For example, the following expression constraint matches all rows of the 816080008 | International Patient Summary| which have been updated since 31st July 2021 (inclusive). Note that the referencedComponentId is the only field returned.
Active filters enable an expression constraint to match on only those members of a reference set with a matching active status. Reference set rows are either active (i.e. active = 1 or active = "true") or inactive (i.e. active = 0 or active = "false"). By default, only active members of a reference set are included in the substrate.
For example, the following expression constraints returns the inactive members of the 816080008 | International Patient Summary| .