Search



Versions Compared

Key

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

...

Scg expression
Bordersolid
ShowFormatblock
^ 816080008 |International Patient Summary| {{ C active = false }}

...



Display Footnotes Macro

In this section, we illustrate how concept filters can be applied to expression constraints to further restrict the matching concepts.

Overview

Concept filter constraints provide the ability to limit the set of concepts that satisfy a given expression constraint, based on the properties of each concept. Only concepts with properties that match the criteria specified in the concept filter constraint will be included in the set of matching concepts. Concepts can be filtered based on their definition status, module, effectiveTime, and active status. In the following sections we explain each of these concept filter criteria.

Definition Status Filter

Definition status filters enable an expression constraint to match on only those concepts with a matching definition status. Definition status filters may either use the keyword 'definitionStatus' with the values "defined" or "primitive", or may use the keyword "definitionStatusId" with a concept value that is 

Scg expression
ShowFormatinline
< 900000000000444006 |Definition status|

The following table lists the valid definitionStatus tokens and their equivalent definitionStatusId concept reference alternatives. If additional definition statuses are required, these must be specified in a filter using the 'definitionStatusId' keyword with the corresponding concept reference.

...

definitionStatusId (concept reference)

...

For example,  the expression constraints below match all the primitive subtypes of 

Concept
ShowPartsterm
t56265001 |Heart disease|
.

Scg expression
Bordersolid
ShowFormatblock
< 56265001 |Heart disease| {{ C definitionStatus = primitive }}
Scg expression
Bordersolid
ShowFormatblock
< 56265001 |Heart disease| {{ C definitionStatusId = 900000000000074008 |Primitive| }}

Similarly, the two expression constraints below match all the fully defined subtypes of 

Concept
ShowPartsterm
t56265001 |Heart disease|
.

Scg expression
Bordersolid
ShowFormatblock
< 56265001 |Heart disease| {{ C definitionStatus = defined }}
Scg expression
Bordersolid
ShowFormatblock
< 56265001 |Heart disease| {{ C definitionStatusId = 900000000000073002 |Defined| }}

Please note that Concept filters and Description Filters can be used together to filter the results of an expression constraint based on both the properties of each concept and the properties of their descriptions. For example the following expression constraint matches all primitive subtypes of 

Concept
t64572001 |Disease|
, which have at least one description term that includes a word starting with "heart".

Scg expression
Bordersolid
ShowFormatblock
<  64572001 |Disease|  {{ C definitionStatus = primitive }} {{ D term = "heart"}}

Module Filter

Module filters enable an expression constraint to match on only those concepts that belong to a specified module

Footnote Macro

Please note that module filters are not intended to replace the use of simple reference sets to organize content of a particular type. Module filters are instead intended to be used for purposes related to the management of extensions or editions.

. 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|
 that belong to the US National Library of Medicine maintained module.

Scg expression
Bordersolid
ShowFormatblock
< 195967001 |Asthma| {{ C moduleId = 731000124108 |US National Library of Medicine maintained module| }}

And the expression constraint below matches all primitive subtypes of 

Concept
t195967001 |Asthma|
 that belong to the international core module.

Scg expression
Bordersolid
ShowFormatblock
< 195967001 |Asthma| {{ C definitionStatus = primitive, moduleId = 900000000000207008 |SNOMED CT core module| }}

Effective Time Filter

Effective time filters enable an expression constraint to match on only those concepts with an effectiveTime that matches the specified criteria. Effective time filters may use any of the date comparison operators shown below:

...

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 concept 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 

Concept
t125605004 |Fracture of bone|
 with an effective time of 31st January 2021.

Scg expression
Bordersolid
ShowFormatblock
< 125605004 |Fracture of bone| {{ C effectiveTime = "20210131" }}

And the following expression constraint matches all subtypes of 

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

Scg expression
Bordersolid
ShowFormatblock
< 125605004 |Fracture of bone| {{ C effectiveTime != "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 an effectiveTime of 31st July 2019 or later (i.e. more recent).

Scg expression
Bordersolid
ShowFormatblock
< 125605004 |Fracture of bone| {{ C effectiveTime >= "20190731" }}

And the following expression constraint matches all subtypes of 

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

Scg expression
Bordersolid
ShowFormatblock
< 125605004 |Fracture of bone| {{ C effectiveTime <= "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 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| {{ C effectiveTime = ("20190131" "20190731" "20200131" "20200731" }}

And the expression constraint below matches all subtypes of 

Concept
t125605004 |Fracture of bone|
 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| {{ C effectiveTime != ("20190131" "20190731" "20200131" "20200731" }}

To match unpublished concepts 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|
 to which an effectiveTime has not yet been assigned.

Scg expression
Bordersolid
ShowFormatblock
< 125605004 |Fracture of bone| {{ C effectiveTime = "" }}

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

Active Filter

Active filters enable an expression constraint to match on only those concepts with a matching active status. Concepts are either active (i.e. active = 1 or active = "true") or inactive (i.e. active = 0 or active = "false"). By default, both active and inactive concepts are included in the substrate. This allows inactive members of a reference set to be retrieved (e.g. for historical reference sets, in which the referenced component is intended to be inactive). However, because only active relationships are included in the default substrate, as soon as a refinement or hierarchical operator is used, only active concepts are matched.

For example, the following expression constraints returns only active concepts in the International Patient Summary reference set.

Scg expression
Bordersolid
ShowFormatblock
^ 816080008 |International Patient Summary| {{ C active = 1 }}
Scg expression
Bordersolid
ShowFormatblock
^ 816080008 |International Patient Summary| {{ C active = true }}

And the following expression constraints return only inactive concepts in the International Patient Summary reference set.

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

Display Footnotes Macro