Search



Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 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, and 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 these 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 see 6.9 Concept Filter ConstraintsFilters). 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.

...

Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ term = ("heart" "card")}}






The other match technique that may be used is a wildcard matchsearch.  This uses an asterisk technique is specified using the keyword "wild:" and matches the search term in the expression constraint against the entire candidate description term (rather than just individual words).  An asterisk ('*') is used as a wildcard to indicate that any (zero to many) characters may appear in the given position, and is specified using the keyword "wild:" before the search term.

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)".

...

Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ term = wild:"cardi*opathy"}}

It is also possible to mix the match techniques in a search term setPlease note that to perform an exact string match on an entire term, a wildcard search without a wildcard can be used (e.g. term=wild:"cardiopathy"). For example, the following expression constraint below will match those only diseases with a description term that either contains a word starting with "gas", or ending with "itis" - e.g. "gastric flu", "gastritis", or "tonsillitis".exactly matches the full string "cardiopathy". This expression constraint will therefore match the concept 

Concept
t56265001 |Heart disease (disorder)|
 (with synonym "Cardiopathy"), but will not match the concept 
Concept
t870575001 |Disorder of cardiac atrium (disorder)|
 (with synonym "Atrial cardiopathy")

Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ term = (match:"gas" wild:"*itiscardiopathy")}}

If more than one filter is applied, then all filters (surrounded in double braces) must match at least one description of a concept, for that concept to satisfy the constraint. The descriptions that match each of the filters can either be the same description, or different descriptions on the same concept.

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 

Concept
t9826008 |Conjunctivitis (disorder)|
(with synonyms "Pink eye disease" and "Conjunctivitis") and the concept 
Concept
t15680481000119104 |Viral conjunctivitis of bilateral eyes (disorder)|
(with synonyms "Bilateral viral conjunctivitis" and "Viral conjunctivitis of both eyes"), but would not match the concept 
Concept
t45261009 |Viral conjunctivitis (disorder)|
(which does not have a synonym matching the word prefix "eye").

Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ term = "eye"}} {{ term = wild:"*itis"}}

It is also possible to mix the match techniques in a search term set. For example, the expression constraint below will match those diseases with a description term that either contains a word starting with "gas", or ending with "itis" - e.g. "gastric flu", "gastritis", or "tonsillitis".

Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ term = (match:"gas" wild:"*itis")}}



If more than one filter is applied, then all filters (surrounded in double braces) must match at least one description of a concept, for that concept to satisfy the constraint. The descriptions that match each of the filters can either be the same description, or different descriptions on the same concept.

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 

Concept
t9826008 |Conjunctivitis (disorder)|
(with synonyms "Pink eye disease" and "Conjunctivitis") and the concept 
Concept
t15680481000119104 |Viral conjunctivitis of bilateral eyes (disorder)|
(with synonyms "Bilateral viral conjunctivitis" and "Viral conjunctivitis of both eyes"), but would not match the concept 
Concept
t45261009 |Viral conjunctivitis (disorder)|
(which does not have a synonym matching the word prefix "eye").


Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ term = "eye"}} {{ term = wild:"*itis"}}

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. 

Concept
t41884003 | hjärtpolyp |
from the Swedish Edition (20200531) Please note that filters apply only to the subexpression directly to the left of the filter. For example, the following expression constraint will apply the term filter to only the descendants or self of 
Concept
t415582006 |Stenosis|
. This expression constraint will match descendants of 
Concept
t404684003 |Clinical finding|
 with a finding site that is a descendant or self of 
Concept
t39057004 |Pulmonary valve structure|
, and an associated morphology that is any descendant or self of 
Concept
t415582006 |Stenosis|
 which has a description matching the term "insufficiency". Therefore, the concept
Concept
t123801008 |Heart valve stenosis and regurgitation (disorder)|
 will match this expression constraint because it has the associated morphology 
Concept
t708027006 |Valvular stenosis with valvular insufficiency|
.

Scg expression
Bordersolid
ShowFormatblock
< 64572001 404684003 |Clinical findingDisease| :
{{ term = "hjärt", language =    363698007 |Finding site|  = <<  39057004 |Pulmonary valve structure| , 
         116676008 |Associated morphology|  = <<  415582006 |Stenosis| {{ term = "insufficiency" }}sv }}

The expression constraint below matches only those diseases with a Swedish description containing the word prefix "hjärt" and an English description containing the word prefix "heart" - e.g. 

Concept
t84114007 |hjärtsvikt|
(with English synonym "Heart failure") from the Swedish Edition (20200531).

Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ term = "hjärt", language = sv }} {{ term = "heart", language = en }}

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 

Scg expression
ShowFormatinline
< 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 SyntaxFull Syntax
fsnfullySpecifiedName900000000000003001 |Fully specified name|
synsynonym900000000000013009 |Synonym|
defdefinition900000000000550004 |Definition|


For example,  the expression constraint below matches all the subtypes of 

Concept
ShowPartsterm
t56265001 |Heart disease|
, that have a fully specified name containing the word prefix "heart".

Scg expression
Bordersolid
ShowFormatblock
< 56265001 |Heart disease| {{ term = "heart", type = fsn }}

The following two expression constraints are equivalent, and both match only the subtypes of 

Concept
ShowPartsterm
t56265001 |Heart disease|
, which have a Swedish synonym containing the word prefix "hjärt".

Scg expression
Bordersolid
ShowFormatblock
< 56265001 |Heart disease| {{ term = "hjärt", language = SV, type = syn }}




Scg expression
Bordersolid
ShowFormatblock
< 56265001 |Heart disease| {{ term = "hjärta", language = sv, typeId = 900000000000013009 |synonym| }}



The two equivalent expression constraints below match the subtypes of 

Concept
ShowPartsterm
t56265001 |Heart disease|
, which either have a synonym containing the word prefix "heart", or a fully specified name containing the word prefix "heart".




Scg expression
Bordersolid
ShowFormatblock
< 56265001 |Heart disease| {{ term = "heart", type = (syn fsn) }}


Scg expression
Bordersolid
ShowFormatblock
< 56265001 |Heart disease| {{ term = "heart", typeId = (900000000000013009 |Synonym| 900000000000003001 |Fully specified name|) }}

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

Scg expression
ShowFormatinline
< 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 

Concept
ShowPartsterm
t64572001 |Disease|
 that have a description in the Australian English language reference set.

Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ dialect = en-au }}


Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ dialectId = 32570271000036106 |Australian English language reference set| }}






The expression constraint below matches all diseases with a description in the New Zealand English language reference set that has a word starting with "cardio".

Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ term = "cardio", dialect = en-nz }}


In some situations, multiple language reference sets need to be used together to identify an appropriate set of concepts. A filter constraint may include a list of dialects to specify that a matching description may belong to any of the given language reference sets. 

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".


Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ term = "card", dialect = ( en-nhs-clinical en-nhs-pharmacy ) }}

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 

Scg expression
ShowFormatinline
< 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 SyntaxFull Syntax
preferpreferred900000000000548007 |Preferred|
acceptacceptable900000000000549004 |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'.


Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ term = "box", type = syn, dialect = en-us (prefer) }}


Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ term = "box", typeId = 900000000000013009 |Synonym|, dialect = en-us (900000000000548007 |Preferred|) }}

Multiple dialect filters may be used with different acceptabilities applied to each. For example, the expression constraint below matches on diseases, which have a synonym with word prefix "box" that is preferred in the en-nhs-clinical language reference set and is acceptable in the en-gb language reference setTo apply a filter to a subexpression, which includes a refinement or binary operators, the subexpression must be enclosed in brackets. For example, the following expression constraint will find all the descendants of clinical finding, with a finding site that is a descendant or self of 

Concept
t39057004 |Pulmonary valve structure|
 and an associated morphology that is a descendant or self of 
Concept
t415582006 |Stenosis|
, and will then match only those clinical finding concepts that have a description that matches the term "insufficiency". Therefore, the concept
Concept
t123801008 |Heart valve stenosis and regurgitation (disorder)|
 will not match this expression constraints, as it does not have a description that matches the term "insufficiency".

Scg expression
Bordersolid
ShowFormatblock
(<  404684003 |Clinical finding| :
         363698007 |Finding site|  = <<  39057004 |Pulmonary valve structure| , 
         116676008 |Associated morphology|  = <<  415582006 |Stenosis|) {{ term = "insufficiency" }}

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).

...

Concept
t41884003 | hjärtpolyp |

...

< 64572001 |Disease| {{ term = "box", type = syn, dialect = en-nhs-clinical (prefer), dialect = en-gb (accept) }}

To support alternative acceptabilities in more than one language reference set, a dialect set can be used. For example, the following two equivalent expression constraints match on diseases, which have a synonym with word prefix "box" that is either preferred in the en-gb language reference set or preferred in the en-nhs-clinical language reference set.

Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ term = "box", type = syn, dialect = ( en-gb (prefer) en-nhs-clinical (prefer) ) }}


Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ termterm = "box", type = syn, dialect = "hjärt", language = sv( en-gb en-nhs-clinical ) (prefer) }}

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 

Concept
ShowPartsterm
t125605004 |Fracture of bone|
 that do not use the word prefix "fracture" in their US English preferred termThe expression constraint below matches only those diseases with a Swedish description containing the word prefix "hjärt" and an English description containing the word prefix "heart" - e.g. 
Concept
t84114007 |hjärtsvikt|
(with English synonym "Heart failure") from the Swedish Edition (20200531).

Scg expression
Bordersolid
ShowFormatblock
< 125605004 |Fracture 64572001of bone|Disease| {{ term != "hjärtfracture", languagetype = sv }} {{ term = "heart"syn, languagedialect = en-us (prefer)}}

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 

Scg expression
ShowFormatinline
< 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.

...

TypeId

Concept Reference

...

If we remove the type and acceptability filters, as shown below, the remaining expression constraint matches on those subtypes of 

Concept
ShowPartsterm
t125605004 |Fracture of bone|
 which have any US English description that does not contain the word prefix "fracture". Concepts including 
Concept
t263171005 |Fractured nasal bones|
 (with synonym "Broken nose") will match the constraint below.

Scg expression
Bordersolid
ShowFormatblock
< 125605004 |Fracture of bone| {{ term != "fracture", dialect = en-us}}


To find the set of concepts, for which all descriptions match some specified criteria, the expression constraint must use the MINUS operation to exclude concepts that have a non-matching description. For example, the expression constraint below matches all subtypes of 

Concept
ShowPartsterm
t125605004 |Fracture of bone|
, for which every description contains the word prefix "fracture". Please note that the filter only applies to the descendants of
Concept
t125605004 |Fracture of bone|
 (i.e. the subexpression directly proceeding the filter)For example,  the expression constraint below matches all the subtypes of 
Concept
ShowPartsterm
t56265001 |Heart disease|
, that have a fully specified name containing the word prefix "heart".


Scg expression
Bordersolid
ShowFormatblockblock
< 125605004 |Fracture of bone| MINUS < 56265001125605004 |HeartFracture of diseasebone| {{ term != "heart", type = fsn fracture"}}

The following two expression constraints are equivalent, and both match only the subtypes of 

Concept
ShowPartsterm
t56265001 |Heart disease|
, which have a Swedish synonym containing the word prefix "hjärt"This expression constraint can be simplified to the equivalent one below, using the wildcard character '*' (which represents any concept in the substrate).

Scg expression
Bordersolid
ShowFormatblock
< 56265001125605004 |HeartFracture of diseasebone| MINUS * {{ term != "hjärt", language = SV, type = syn }}fracture"}}


Using a similar principle, the expression constraint below matches all concepts that do not have a preferred term specified in the en-nz language reference set.

Scg expression
Bordersolid
ShowFormatblock
<* 56265001 |Heart disease|MINUS * {{ termtype = syn, dialect = en-nz (prefer) "hjärta", language = sv, typeId = 900000000000013009 |synonym| }}}}

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

Scg expression
ShowFormatinline
< 900000000000443000 |Module|

.

For example, the expression constraint below matches all subtypes of 

Concept
t195967001 |Asthma|
 with a description that belongs to the US National Library of Medicine maintained moduleThe two equivalent expression constraints below match the subtypes of 
Concept
ShowPartsterm
t56265001 |Heart disease|
, which either have a synonym containing the word prefix "heart", or a fully specified name containing the word prefix "heart".

Scg expression
Bordersolid
ShowFormatblock
< 56265001195967001 |Heart diseaseAsthma| {{ termD moduleId = "heart", type = (syn fsn) }} 731000124108 |US National Library of Medicine maintained module| }}

And the expression constraint below matches all subtypes of 

Concept
t404684003 |Clinical finding|
 with a definition that belongs to the international core module.

Scg expression
Bordersolid
ShowFormatblock
< 56265001404684003 |HeartClinical diseasefinding| {{ termD type = "heart"def, typeIdmoduleId = (900000000000013009900000000000207008 |Synonym|SNOMED 900000000000003001CT |Fully specified name|)core module| }}

...

Effective Time Filter

Dialect Description effective time 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

Scg expression
ShowFormatinline
< 900000000000506000 |Language type reference set|

description that has an effectiveTime matching the specified criteria. Effective time filters may use any of the date comparison operators shown below:

OperatorName
=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. 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 following expression constraint matches all subtypes of 

term
Concept
ShowParts
t64572001 125605004 |DiseaseFracture of bone|
 that have a description in the Australian English language reference set with a description that has an effective time of 31st January 2021.

Scg expression
Bordersolid
ShowFormatblock
< 64572001125605004 |Disease| {{ dialect = en-au }}Fracture of bone| {{ D effectiveTime = "20210131" }}

And the following expression constraint matches all subtypes of 

Concept
t125605004 |Fracture of bone|
 with a description that has any effective time that is not 31st January 2021.

Scg expression
Bordersolid
ShowFormatblock
< 64572001125605004 |DiseaseFracture of bone| {{ dialectIdD effectiveTime != 32570271000036106 |Australian English language reference set| }}"20210131" }}

Similarly, greater than, less than, greater than or equals and less than or equals operators may be used in an effectiveTime filter. For example, the following expression constraint matches all subtypes of 

Concept
t125605004 |Fracture of bone|
 with a description that has an effectiveTime of 31st July 2019 or later (i.e. more recent)The expression constraint below matches all diseases with a description in the New Zealand English language reference set that has a word starting with "cardio".

Scg expression
Bordersolid
ShowFormatblock
< 125605004 |Fracture 64572001of bone|Disease| {{ D termeffectiveTime >= "cardio20190731", dialect = en-nz }}

In some situations, multiple language reference sets need to be used together to identify an appropriate set of concepts. A filter constraint may include a list of dialects to specify that a matching description may belong to any of the given language reference sets. 

}}

And 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"subtypes of 

Concept
t125605004 |Fracture of bone|
 with a description that has an effective time of 31st July 2019 or earlier.

Scg expression
Bordersolid
ShowFormatblock
< 125605004 |Fracture 64572001of bone|Disease| {{ termD effectiveTime <= "card", dialect = ( en-nhs-clinical en-nhs-pharmacy ) }}

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 

Scg expression
ShowFormatinline
< 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.

...

AcceptabilityId

Concept Reference

...

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'.

...

Bordersolid
ShowFormatblock

...

20190731" }}

The effectiveTime filter can also use sets of effective times. For example, the following expression constraint matches all subtypes of 

Concept
t125605004 |Fracture of bone|
 with a description that has an effectiveTime of either 31st January 2019, 31st July 2019, 31st January 2020, or 31st July 2020.

Scg expression
Bordersolid
ShowFormatblock
< 125605004 |Fracture of bone| {{ D effectiveTime = ("20190131" "20190731" "20200131" "20200731" }}

And the expression constraint below matches all subtypes of 

Concept
t125605004 |Fracture of bone|
 with a description, which does not have any of the following effective times: 31st January 2019, 31st July 2019, 31st January 2020 or 31st July 2020.

Scg expression
Bordersolid
ShowFormatblock
< 125605004 |Fracture of bone| {{ D effectiveTime != ("20190131" "20190731" "20200131" "20200731" }}

To match concepts with unpublished descriptions, to which an effectiveTime has not been assigned, an effectiveTime value of "" can be used. For example, the following expression constraint matches all subtypes of 

Concept
t125605004 |Fracture of bone|
 with a description to which an effectiveTime has not yet been assigned.

Scg expression
Bordersolid
ShowFormatblock
< 64572001125605004 |DiseaseFracture of bone| {{ D termeffectiveTime = "box", typeId = 900000000000013009 |Synonym|, dialect = en-us (900000000000548007 |Preferred|) }}

Multiple dialect filters may be used with different acceptabilities applied to each. For example, the expression constraint below matches on diseases, which have a synonym with word prefix "box" that is preferred in the en-nhs-clinical language reference set and is acceptable in the en-gb language reference set.

Scg expression
Bordersolid
ShowFormatblock
< 64572001 |Disease| {{ term = "box", type = syn, dialect = en-nhs-clinical (prefer), dialect = en-gb (accept) }}
" }}

Please note that description effectiveTime filters, which use the comparison operators "<" and ">", will not match any descriptions with an effectiveTime = "".

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 descriptionTo support alternative acceptabilities in more than one language reference set, a dialect set can be used. For example, the following two equivalent expression constraints match on diseases, which have a synonym with word prefix "box" that is either preferred in the en-gb language reference set or preferred in the en-nhs-clinical language reference set.

Scg expression
Bordersolid
ShowFormatblockblock
^ 816080008 |International Patient Summary| {{ D active = 1 < 64572001 |Disease| {{ term = "box", type = syn, dialect = ( en-gb (prefer) en-nhs-clinical (prefer) ) }}


Scg expression
Bordersolid
ShowFormatblock
<^ 64572001816080008 |Disease|International {{ term = "box", type = syn, dialect = ( en-gb en-nhs-clinical ) (prefer) }}

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.

...

Concept
ShowPartsterm
t125605004 |Fracture of bone|

...

Patient Summary| {{ D active = true }}

And the following expression constraints return all concepts in the International Patient Summary reference set, which have an inactive description.

Scg expression
Bordersolid
ShowFormatblock
^ 816080008 |International Patient Summary| {{ D active = 0 }}


Scg expression
Bordersolid
ShowFormatblock
<^ 125605004816080008 |FractureInternational ofPatient boneSummary| {{ term != "fracture", type = syn, dialect = en-us (prefer)}}D active = false }}

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

Concept
t707444001 |Uncomplicated asthma (disorder)|
If we remove the type and acceptability filters, as shown below, the remaining expression constraint matches on those subtypes of 
Concept
ShowPartsterm
t125605004 |Fracture of bone|
 which have any US English description that does not contain the word prefix "fracture". Concepts including 
Concept
t263171005 |Fractured nasal bones|
 (with synonym "Broken nose") will match the constraint below.

Scg expression
Bordersolid
ShowFormatblock
< 125605004 |Fracture of bone| * {{ D termid != "fracture", dialect = en-us}}3032638017 }}

Description id filters can also be applied to other expression constraints, to check whether the concept with the matching description id is in a given set of concepts. For example, the following expression constraint will match any descendant of

Concept
t195967001 |Asthma (disorder)|
, which has a description with identifier "3032638017". This can be used to check if the concept with the given description id is a descendant of
Concept
t195967001 |Asthma (disorder)|
.

Scg expression
Bordersolid
ShowFormatblock
< 195967001 |Asthma (disorder)| {{ D id = 3032638017 }}

Description id filters may also include a set of description identifiers. The following expression constraint will match any descendant To find the set of concepts, for which all descriptions match some specified criteria, the expression constraint must use the MINUS operation to exclude concepts that have a non-matching description. For example, the expression constraint below matches all subtypes of 

Concept
ShowPartsterm
t125605004 |Fracture of bone|
, for which every description contains the word prefix "fracture". Please note that the filter only applies to the descendants of
Concept
t
125605004 |Fracture of bone|
195967001 |Asthma (disorder)|
, with a description whose identifier is either "1208972017", "2674140012" or "3043971012"
 (i.e. the subexpression directly proceeding the filter).

Scg expression
Bordersolid
ShowFormatblock
< 125605004195967001 |Fracture of boneAsthma (disorder)| MINUS{{ <D 125605004id |Fracture= of(1208972017 bone| {{ term != "fracture"}}

This expression constraint can be simplified to the equivalent one below, using the wildcard character '*' (which represents any concept in the substrate).

Scg expression
Bordersolid
ShowFormatblock
< 125605004 |Fracture of bone| MINUS * {{ term != "fracture"}}
2674140012 3043971012) }}

Please note that inactive concepts can have active descriptions, so the description id filter can be applied after inactive concepts are added to the query results via a history supplement. For example, the following expression constraint matches any descendant of the concept

Concept
t195967001 |Asthma (disorder)|
, or any inactive concept that is associated with a descendant of
Concept
t195967001 |Asthma (disorder)|
via an historical association, as long as the concept has a description with the identifier "264553015". The only concept that matches this expression constraint is the inactive concept 
Concept
t170644007 |Mild asthma|
Using a similar principle, the expression constraint below matches all concepts that do not have a preferred term specified in the en-nz language reference set.

Scg expression
Bordersolid
ShowFormatblock
* MINUS *(< 195967001 |Asthma (disorder)| {{ type = syn, dialect+HISTORY}}) {{ D id = en-nz (prefer) }}264553015 }}



For more information on history supplements, please refer to 6.11 History Supplements.