In this section, we illustrate how the set of matching concepts can be filtered using one or more simple attribute refinements. For more information on applying refinements to nested expression constraints, using nested attribute names and using nested attribute values, please refer to 6.7 Nested Expression Constraints.
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 79654002 | 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| }
Attribute Constraint Operators
In some cases, an attribute concept has subtypes or supertypes in the | Concept model attribute| hierarchy. Where this occurs, it is possible to indicate that an attribute condition may be satisfied by matching one of the subtypes or supertypes of the given attribute. This is done adding a constraint operator directly before the attribute name concept. For example, the expression constraint below will not only match clinical findings that are | Associated with| a type of | Edema| , but also those that are | Due to| , | After| or the | Causative agent| of a type of | 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|
ancestorOrSelfOf 42752001 |Due to| = descendantOrSelfOf 267038008 |Edema|
Concrete Values
The revised SNOMED CT Compositional Grammar allows attributes to be given concrete values (e.g. Strings, Integers, Decimal, Boolean). 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 constraint is satisfied by oral medicinal products, which contain amoxicillin and have a presentation strength greater than or equal to 250 mg.
411116001 |Has manufactured dose form (attribute)| = << 385268001 |Oral dose form (dose form)| ,
{ << 127489000 |Has active ingredient (attribute)| = << 372687004 |Amoxicillin (substance)| ,
1142135004 |Has presentation strength numerator value (attribute)| >= #250,
732945000 |Has presentation strength numerator unit (attribute)| = 258684004 |milligram (qualifier value)| }
To find those oral amoxicillin products that have a strength between 250 and 800 mg (inclusive), the following expression constraint may be used:
411116001 |Has manufactured dose form (attribute)| = << 385268001 |Oral dose form (dose form)| ,
{ << 127489000 |Has active ingredient (attribute)| = << 372687004 |Amoxicillin (substance)| ,
1142135004 |Has presentation strength numerator value (attribute)| >= #250,
1142135004 |Has presentation strength numerator value (attribute)| <= #800,
732945000 |Has presentation strength numerator unit (attribute)| = 258684004 |milligram (qualifier value)| }
Reverse Attributes
In most cases, an attribute refinement is satisfied by those concepts, which are the source concept of a defining relationship whose destination concept matches the attribute value. In some cases, however, it may be necessary to select the destination 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'3 . In the brief syntax, the reverse flag is represented by preceding the name of the attribute with a capital letter 'R'.
For example, the expression constraint below finds the set of anatomical structures, which are the finding site of a type of bone fracture (e.g. 85050009 | Humerus| , 71341001 | Femur| ).
The above expression constraint is represented in the long syntax as:reverseOf 363698007 |Finding site| = descendantOf 125605004 |Fracture of bone|
Dotted Attributes
An alternative way of representing 'reversed attributes' is by applying the dot notation to represented them as dotted attributes. Using this alternative notation, " < 123456 123456 |X| .234567 234567 |Y| " represents the set of attribute values (i.e. destination concepts) of the attribute "Y" for descendants or self of concept "X". This is therefore equivalent to " * : R 234567 234567 |Y| = < 123456 123456 |X| " using the reverse flag.
The previous expression constraint (which finds the set of body sites for any subtype of bone fracture) has an equivalent representation using the 'dot notation' of:
Because all values of 363698007 | Finding site| must be < 91723000 | Anatomical structure| (according to the SNOMED CT concept model), this expression constraint can be further simplified to: The next example finds the set of substances, which are an active ingredient in any product containing amoxicillin.ReverseOf descendantOrSelfOf 127489000 |Has active ingredient| = descendantOf 27658006 |Product containing amoxicillin|
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 | Concrete values of type string are case sensitive and compared using the Unicode Collation Algorithm (http://www.unicode.org/reports/tr10/). |
2 | Please note that the concept 859999999102 |Is in national benefit scheme| is a fictitious attribute used here to illustrate boolean values. |
3 | 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