In this section, we illustrate how description filters can be applied to expression constraints to further restrict the matching concepts.
Overview
Description filter constraints provide the ability to limit the set of concepts, that satisfy a given expression constraint, based on the descriptions associated with each concept. Only concepts that have at least one matching description for each filter criteria will be included in the set of matching concepts. Descriptions can be filtered based on their term, type, language, dialect, acceptability in a given dialect, module, effectiveTime, active status and description identifier. Description filters are specified inside double curly braces, and optionally being with the letter "D". Any filter that does not specify its type is, by default, assumed to be a description filter.
In the following sections, we explain each type of description filter criteria.
Term Filter
Term filters enable an expression constraint to match on only those concepts with an associated description whose term matches the given search term. For example, the following expression constraint is satisfied by SNOMED CT concepts with a description matching the search terms "heart" and "att". This expression constraint works like a term search performed in a SNOMED CT browser. Please note that the "D" (either upper or lower case) at the start of the filter indicates that this is a description filter constraint, rather than a concept filter constraint (see 6.9 Concept Filters). If the type of a filter constraint is not specified (as in most of the examples below), then it is assumed that the constraint is a description constraint.
The example below matches only those diseases with a description term containing either a word starting with "heart" or a word starting with "card" (or both).
For example, the expression constraint below will match only diseases with a description term starting with "cardi" and ending with "opathy" with any number of characters between. This term filter would therefore match on terms such as "cardiopathy", "cardiomyopathy" and "cardiac channelopathy", but would not match on terms like "atrial cardiopathy" or "Cardiomyopathy (disorder)".
The expression constraint below matches those diseases which have both a description that contains a word starting "eye" and a description that ends with "itis". For example, this constraint would match the concept 9826008 | Conjunctivitis (disorder)| (with synonyms "Pink eye disease" and "Conjunctivitis") and the concept 15680481000119104 | Viral conjunctivitis of bilateral eyes (disorder)| (with synonyms "Bilateral viral conjunctivitis" and "Viral conjunctivitis of both eyes"), but would not match the concept 45261009 | Viral conjunctivitis (disorder)| (which does not have a synonym matching the word prefix "eye").
Language Filter
Language filters enable an expression constraint to match on only those concepts with a matching description in a specified language. Language filters use the keyword "language", followed by a comparison operator (e.g. "=" or "!="), and the ISO 639-1 two-character language code (in upper or lowercase).
The expression constraint below matches only those diseases with a Swedish description containing the word prefix "hjärt" - e.g. 41884003 | hjärtpolyp| from the Swedish Edition (20200531)
Description Type Filter
Type filters enable an expression constraint to match on only those concepts with a matching description of a specified type. Type filters may either use the keyword "type" with the values "fsn", "syn" or "def", or may use the keyword "typeId" with a concept value that is < 900000000000446008 |Description type| .
The following table lists the valid description type keywords in both the brief and full syntax, and their equivalent concept reference alternatives. Please note that the full syntax accepts both the brief and full syntax keywords. If additional description types are required, these must be specified in a filter using the 'typeId' keyword with the corresponding concept reference.
Type Keyword | TypeId Concept Reference | |
---|---|---|
Brief Syntax | Full Syntax | |
fsn | fullySpecifiedName | 900000000000003001 |Fully specified name| |
syn | synonym | 900000000000013009 |Synonym| |
def | definition | 900000000000550004 |Definition| |
For example, the expression constraint below matches all the subtypes of | Heart disease| , that have a fully specified name containing the word prefix "heart".
Dialect Filter
Dialect filters enable an expression constraint to match on only those concepts with a matching description in a specified language reference set. Dialect filters may either use the keyword "dialect" with a value that represents a valid alias for a specific language reference set, or may use the keyword "dialectId" with a concept value that is < 900000000000506000 |Language type reference set| . Please refer to Appendix C - Dialect Aliases for a selection of valid dialect aliases for known language reference sets.
For example, the two equivalent expression constraints below will match all subtypes of | Disease| that have a description in the Australian English language reference set.
For example, the following expression constraint matches all diseases that have a description in either the en-nhs-clinical or en-nhs-pharmacy language reference sets, where that description contains a word starting with the prefix "card".
Acceptability Filter
Acceptability filters enable an expression constraint to match on only those concepts with a matching description that has the specified acceptability in the specified language reference set. Acceptability filters must always be applied to a specified dialect. As such, they are represented by placing the required acceptability in brackets after the value of the dialect filter. Acceptabilities can be indicated using either one of the keywords below, or using a concept value that is < 900000000000511003 |Acceptability| . The following table lists the valid acceptability keywords in both the brief and full syntax, and their equivalent concept reference alternatives. Please note that the full syntax accepts both the brief and full syntax keywords.
Acceptability Keyword | AcceptabilityId Concept Reference | |
---|---|---|
Brief Syntax | Full Syntax | |
prefer | preferred | 900000000000548007 |Preferred| |
accept | acceptable | 900000000000549004 |Acceptable| |
For example, the following two expression constraints both match all descendants of disease with a description that matches the word prefix 'box', has the type 'synonym', and has an acceptability of 'preferred' in the en-us language reference set. In other words, this expression constraint matches diseases with a US English preferred term that uses the word prefix 'box'.
Filters with Negation
Filters can use negation in a number of ways. The simplest approach is to use the 'not equal to' comparison operator (e.g. "!=") before the value.
For example, the following expression constraint matches on subtypes of | Fracture of bone| that do not use the word prefix "fracture" in their US English preferred term.
Module Filter
Description module filters enable an expression constraint to match on only those concepts with a matching description that belongs 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 subtypes of 195967001 | Asthma| with a description that belongs to the US National Library of Medicine maintained module.
Effective Time Filter
Description effective time filters enable an expression constraint to match on only those concepts with a description that has an effectiveTime matching the specified criteria. Effective time filters may use any of the date comparison operators shown below:
Operator | Name |
---|---|
= | Equals |
!= | Not equals |
< | Before the given date |
<= | Before or on the given date |
> | After the given date |
>= | After or on the given date |
Please note that the value of an effective time filter (if present) must be a 8 digit date, formatted according to ISO 8601's basic calendar date format (i.e. YYYYMMDD). If the effectiveTime of the description in the substrate includes a time and/or time zone designator, these should be ignored when performing the comparison.
For example, the following expression constraint matches all subtypes of 125605004 | Fracture of bone| with a description that has an effective time of 31st January 2021.
Active Filter
Description active filters enable an expression constraint to match on only those concepts with a description that has a matching active status. Descriptions are either active (i.e. active = 1 or active = "true") or inactive (i.e. active = 0 or active = "false"). By default, only active descriptions are included in the substrate.
For example, the following expression constraints return all concepts in the International Patient Summary reference set, which have an active description.
Description Id Filter
Description id filters enable an expression constraint to match on only those concepts with a description that has a matching description identifier. For example, the following expression constraint matches any concept, which has an associated description with the identifier "3032638017". The only concept that matches this expression constraint is 707444001 | Uncomplicated asthma (disorder)| .
Feedback