In this section, we illustrate how the set of matching concepts can be filtered using one or more attribute refinements.
Attributes
Adding an attribute refinement to an expression constraint restricts the set of valid clinical meanings to only those whose defining attributes satisfy the given refinement condition. Similarly to SNOMED CT Compositional Grammar, attribute refinements are placed after a 'colon' (i.e. ":") in the expression constraint.
The example below is satisfied only by the set of lung disorders, which have an associated morphology that is exactly equal to |Edema| .
Using the long syntax, the above expression is represented as:116676008 |Associated morphology| = descendantOrSelfOf 79654002 |Edema|
Attribute groups
Similarly to SNOMED CT compositional grammar, expression constraints use curly braces (i.e. "{..}") to indicate that a set of attributes should be grouped together in an attribute group. For example, the expression constraint below is satisfied only by the set of clinical findings with an associated morphology of 'stenosis' (or descendant) at the finding site 'pulmonary valve structure' (or descendant), and also with an associated morphology of 'hypertrophy' (or descendant) at the finding site 'right ventricular structure' (or descendant).
{ 363698007 |Finding site| = << 39057004 |Pulmonary valve structure| ,
116676008 |Associated morphology| = << 415582006 |Stenosis| },
{ 363698007 |Finding site| = << 53085002 |Right ventricular structure| ,
116676008 |Associated morphology| = << 56246009 |Hypertrophy| }
{ 363698007 |Finding site| = descendantOrSelfOf 39057004 |Pulmonary valve structure| ,
116676008 |Associated morphology| = descendantOrSelfOf 415582006 |Stenosis| },
{ 363698007 |Finding site| = descendantOrSelfOf 53085002 |Right ventricular structure| ,
116676008 |Associated morphology| = descendantOrSelfOf 56246009 |Hypertrophy| }
Nested attributes
Similarly to the SNOMED CT Compositional Grammar, it is also possible to nest expression constraints within an attribute value. Please note that when the attribute value is a simple expression constraint (as per the above examples), brackets are not required around the value. However, when the attribute value is either an expression constraint with a refinement, or a compound expression constraint with a binary operator, then brackets must be placed around the attribute value. For example, the following expression constraint represents the set of clinical findings which are associated with another clinical finding that has an associated morphology of 'infarct' (or subtype).
Using the long syntax, the above expression constraint may be represented as:
47429007 |Associated with| = (descendantOf 404684003 |Clinical finding| :
116676008 |Associated morphology| = descendantOrSelfOf 55641003 |Infarct| )
Attribute operators
In some cases, an attribute concept has subtypes in the SNOMED CT hierarchy. Where this occurs, it is possible to indicate that an attribute condition may be satisfied by matching one of the subtypes of the given attribute. This is done using the 'descendantOf' or 'descendantOrSelfOf' operator directly before the attribute name concept. For example, the expression constraint below will not only match clinical findings that are associated with edema, but also those that are due to, after or caused by an edema. This result occurs because the 47429007 |Associated with| attribute concept has three subtypes: 255234002 |After| , 246075003 |Causative agent| and 42752001 |Due to| .
This expression constraint is represented in the long syntax as:descendantOrSelfOf 47429007 |Associated with| = descendantOrSelfOf 267038008 |Edema|
Concrete values
The revised SNOMED CT Compositional Grammar allows attributes to be given concrete values (e.g. Strings, Integers, Decimal). The SNOMED CT Expression Constraint Language supports the ability to compare these attribute values with a given concrete value.
When numeric concrete values (i.e. Integers and Decimals) are compared, a set of standard mathematical operators may be used. These mathematical operators are:
Operator | Name |
= | Equals |
!= | Not equals |
< | Less than |
<= | Less than or equals |
> | Greater than |
>= | Greater than or equals |
Please note that the 'not equals' operator may alternatively be represented as "<>" and "not =" (case insensitive) in the long syntax.
The following expression constraint1 is satisfied only by amoxicillin capsules, whose strength is greater than or equal to 500 mg.
411116001 |Has dose form| = << 385049006 |Capsule| ,
{ 111115 111115 |Has basis of strength| = ( 111115 111115 |Amoxicillin only| :
111115 111115 |Strength magnitude| >= #500, 111115 500111115 |Strength unit| = 258684004 |mg| )}
To find those capsules that have a strength between 500 and 800 mg (inclusive), the following expression constraint may be used:
411116001 |Has dose form| = << 385049006 |Capsule| ,
{ 111115 111115 |Has basis of strength| = ( 111115 111115 |Amoxicillin only| :
111115 111115 |Strength magnitude| >= #500, 111115 500111115 |Strength magnitude| <= #800, 111115 800111115 |Strength unit| = 258684004 |mg| )}
Reverse attributes
In most cases, an attribute refinement is satisfied by those concepts, which are the source concept of a defining relationship whose target concept matches the attribute value. In some cases, however, it may be necessary to select the target concept of a relationship and constrain the source concept to a given attribute value. To achieve this, an expression constraint indicates that an attribute is to be constrained in the reverse order using a 'reverse flag'2 . In the brief syntax, the reverse flag is represented by placing the name of the attribute being reversed inside a pair of round brackets, and preceding this with a capital letter 'R'.
For example, the expression constraint below finds the set of substances, which are active ingredients of 'TRIPHASIL tablet'.
The above expression constraint is represented in the long syntax as:reverseOf 127489000 |Has active ingredient| = 111115 111115 |TRIPHASIL tablet|
Any attribute name and value
A single 'star' (i.e. "*") may be used in the place of an attribute name to represent any attribute in the substrate. The expression constraint below evaluates to the set of clinical findings which have any attribute with a value of 79654002 |Edema| .
Using the long syntax, the above expression constraint may also be represented as:Ref | Notes |
---|---|
1 | Please note that these examples are based on a hypothetical drug concept model, and is not intended to reflect any specific drug model. Concepts for which an identifier has not been assigned have been shown with an identifier of '111115'. |
2 | It should be noted that using a reversed attribute joined by conjunction with a non-reversed attribute may lead to a nonsensical constraint (e.g. "<<a: {b=c, Rd=e}"). This is because the target concept of the reversed attribute must be matched with the source concept of the non-reversed attribute, which in turn must be the same as the source concept of the reversed attribute (being in the same attribute group). This would require the reversed attribute to be reflexive (i.e. the source and target concept to be the same). |
Feedback