Search



Versions Compared

Key

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

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 'edema'.
< 19829001 |disorder of lung|:
116676008 |associated morphology| = 79654002 |edema

Concept
t79654002|Edema|
.

Scg expression
Borderridge
ShowFormatblock
	< 19829001 |Disorder of lung|:
		116676008 |Associated morphology| = 79654002 |Edema|

Using the long syntax, the above expression is represented as:

Scg expression
Borderridge
ShowFormatblock
	descendantOf 19829001 |

...

Disorder of lung| :

...

 
		116676008 |

...

Associated morphology| = 79654002 |

...

Edema|

In many cases, however, the value of the matching attribute is allowed to be either the concept itself, or a descendant of that concept. In these cases, the descendantOrSelfOf operator is used prior to the concept representing the attribute value. For example, the expression constraint below (in brief and long syntaxes respectively) is satisfied only by the set of lung disorders, which have an associated morphology of 'edema' or any descendant of 'edema'.
< 19829001 |disorder of lung|:
116676008 |associated morphology| = << 79654002 |edema|
descendantOf 19829001 |disorder of lung| :
116676008 |associated morphology| = descendantOrSelfOf 79654002 |edema

Concept
t79654002|Edema|
 or any descendant of
Concept
t79654002|Edema|
.

Scg expression
Borderridge
ShowFormatblock
	< 19829001 |Disorder of lung|: 
		116676008 |Associated morphology| = << 79654002 |Edema|


Scg expression
Borderridge
ShowFormatblock
	descendantOf 19829001 |Disorder of lung| : 
		116676008 |Associated morphology| = descendantOrSelfOf 79654002 |Edema|

When more than one attribute is defined in an expression constraint, the attributes are normally separated by a comma. A comma between two attributes indicates a conjunction and implies that both attribute conditions must be true. For example, the expression constraint below, written in brief syntax, is satisfied only by the set of clinical findings, which have both a finding site of 'pulmonary

Concept
t39057004|Pulmonary valve structure
'
|
 (or a subtype of 'pulmonary
Concept
t39057004|Pulmonary valve structure
'
|
) and an associated morphology of 'stenosis' (or a subtype of 'stenosis').

Scg expression
Borderridge
ShowFormatblock
	< 404684003 |

...

Clinical finding|:

...


		363698007 |

...

Finding site| = << 39057004 |

...

Pulmonary valve structure|,

...

 
		116676008 |

...

Associated morphology| = << 415582006 |Stenosis|

stenosis|
Anchor_Toc403553805_Toc403553805 Anchor_Toc403553806_Toc403553806 Anchor_Toc403553807_Toc403553807 Anchor_Toc403553808_Toc403553808Please note that attribute refinements may also be used when the focus concept is '*' (or ANY). The following expression constraint represents any concept that has a 'causative agent' attribute whose value is 'paracetamol'.

...

Concept
t246075003|Causative agent|
 attribute whose value is
Concept
t387517004|Paracetamol|
.

Scg expression
Borderridge
ShowFormatblock
	* : 246075003 |Causative agent| = 387517004 |Paracetamol|

Using the long syntax, the above expression may also be represented as:

Scg expression
Borderridge
ShowFormatblock
	ANY : 246075003 |

...

Causative agent| = 387517004 |

...

Paracetamol|

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

Scg expression
Borderridge
ShowFormatblock
	< 404684003 |

...

Clinical finding|:

...


		{ 363698007 |

...

Finding site| = << 39057004 |

...

Pulmonary valve structure|,

...


			116676008 |

...

Associated morphology| = << 415582006 |

...

Stenosis|},

...


		{ 363698007 |

...

Finding site| = << 53085002 |

...

Right ventricular structure|,

...

 
			116676008 |

...

Associated morphology| = << 56246009 |

...

Hypertrophy|}

Using the 'long syntax', the above expression constraint is represented as:

Scg expression
Borderridge
ShowFormatblock
	descendantOf 404684003 |

...

Clinical finding|:

...


		{ 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
ShowPartsterm
t410662002 |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

...

Concept
ShowPartsterm
t47429007 |Associated with|
 a type of 
Concept
ShowPartsterm
t267038008 |Edema|
, but also those that are

...

Concept
ShowPartsterm
t42752001|Due to|
,
Concept
ShowPartsterm
t255234002 |After|
 or the 
Concept
ShowPartsterm
t246075003|Causative agent|
 of a type of
Concept
ShowPartsterm
t267038008 |Edema|
. This result occurs because the
Concept
t47429007|

...

Associated with|

...

 attribute concept has three subtypes:
Concept
t255234002|

...

After|
,
Concept
t246075003|

...

Causative agent|

...

 and
Concept
t42752001|

...

Due to|
.

Scg expression
Borderridge
ShowFormatblock
	<< 404684003 |

...

Clinical finding|:

...


		<< 47429007 |

...

Associated with| = << 267038008 |

...

Edema|

This expression constraint is represented in the long syntax as:

Scg expression
Borderridge
ShowFormatblock
	descendantOrSelfOf 404684003 |

...

Clinical finding|:

...


		descendantOrSelfOf 47429007 |

...

Associated with| = descendantOrSelfOf 267038008 |Edema|

Similarly, the expression constraint below will not only match clinical findings that are 

Concept
ShowPartsterm
t42752001|Due to|
 a type of
Concept
ShowPartsterm
t267038008 |Edema|
, but also those that have an
Concept
ShowPartsterm
t47429007 |Associated with|
 relationship whose value is a type of
Concept
ShowPartsterm
t267038008 |Edema|
.

Scg expression
Borderridge
ShowFormatblock
	<< 404684003 |Clinical finding|:
		>> 246075003|Causative agent| = << 267038008 |Edema|

This expression constraint is represented in the long syntax as:

Scg expression
Borderridge
ShowFormatblock
	descendantOrSelfOf 404684003 |Clinical finding|:
		ancestorOrSelfOf 246075003|Causative agent| = 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 constraint is satisfied only by amoxicillin tablets, whose strength is greater than or equal to 200 mg

Footnote Macro

Please note that these

...

example expressions are based on a hypothetical drug concept model, and

...

are not intended to reflect any specific drug model.

...

In these expressions, the SNOMED CT identifiers created with the '9999999' namespace are for example only, and should not be used in a production environment.

.  

PDF: Force Page Break

Scg expression
Borderridge
ShowFormatblock
	< 27658006 |Amoxicillin|:
		411116001 |Has dose form| = << 385055001 |Tablet dose form|,
		{ 179999999100 |Has basis of strength| = ( 219999999102 |Amoxicillin only|:
			189999999103 |Has strength magnitude| >= #200, 199999999101 |Has strength unit| = 258684004 

...

|mg|)}

Please note that, as per SNOMED CT Compositional Grammar, integer and decimal values are preceded by a hash character (e.g. "#500"), while string values are surrounded by double quotes (e.g. "PANADOL").

To find those capsules that have a strength between 500 and 800 mg (inclusive), the following expression constraint may be used:

Scg expression
Borderridge
ShowFormatblock
	< 27658006 |

...

Amoxicillin|:

...


		411116001 |

...

Has dose form| = <<

...

 385055001 |Tablet dose form|,
		{ 179999999100 |Has basis of strength| = ( 219999999102 |Amoxicillin only|:
			189999999103 |Has strength magnitude| >= #500, 
			189999999103 |Has strength magnitude| <= #800, 
			199999999101 |Has strength unit| = 258684004 |mg|)}

Concrete values of type string may also be included in an expression constraint, and compared using an 'equal to' (i.e. "=") or 'not equal to' (i.e. "!=") operator. The following expression constraint is satisfied only by products with a trade name equal to "PANADOL"

Footnote Macro

Concrete values of type string are case sensitive and compared using the Unicode Collation Algorithm (http://www.unicode.org/reports/tr10/).

Scg expression
Borderridge
ShowFormatblock
	< 373873005 |

...

Pharmaceutical / biologic product|:

...


		209999999104 |Has trade name| = "PANADOL"                

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'

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

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

Concept
t85050009 |Humerus|
,
Concept
t71341001 |Femur|
).

Scg expression
Borderridge
ShowFormatblock
	< 91723000 |Anatomical structure|: 
		R 363698007 |Finding site| = < 125605004 |Fracture of bone|

The above expression constraint is represented in the long syntax as:

Scg expression
Borderridge
ShowFormatblock
	descendantOf 91723000 |Anatomical structure|:
		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, "

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

Scg expression
ShowFormatinline
* : R 234567|Y| = < 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:

Scg expression
Borderridge
ShowFormatblock
	< 91723000 |Anatomical structure| AND (< 125605004 |Fracture of bone|.363698007 |Finding site|)

Because all values of

Concept
t363698007 |Finding site|
 must be
Concept
t< 91723000 |Anatomical structure|
 (according to the
Gloss
tSNOMED CT concept model
), this expression constraint can be further simplified to:

Scg expression
Borderridge
ShowFormatblock
	< 125605004 |Fracture of bone|.363698007 |Finding site|

The next example below finds the set of substances, which are active ingredients of a 'TRIPHASIL tablet'.

Scg expression
Borderridge
ShowFormatblock
	< 105590001 |

...

Substance|:

...

 
		R 127489000 |

...

Has active ingredient| =

...

 249999999101 |TRIPHASIL tablet|

...

This expression constraint is represented in the long syntax as:

Scg expression
Borderridge
ShowFormatblock
	descendantOf 105590001 |

...

Substance|:

...


		reverseOf 127489000 |

...

Has active ingredient|

...

Any attribute name and value

 = 249999999101 |TRIPHASIL tablet|

An equivalent way of representing this constraint, using the 'dot notation' is:

Scg expression
Borderridge
ShowFormatblock
	< 105590001 |Substance| AND (249999999101 |TRIPHASIL tablet|.127489000 |Has active ingredient|)

or (using the

Gloss
tSNOMED CT concept model
 to simplify):

Scg expression
Borderridge
ShowFormatblock
	249999999101 |TRIPHASIL tablet|.127489000 |Has active ingredient|

When more than one dot attribute is used in sequence, the dot notation is evaluated sequentially from left to right. For example, the following expression constraint represents the set of 

Concept
ShowPartsterm
t363698007 |Finding sites|
 of any concept that is 
Concept
ShowPartsterm
t47429007 |Associated with|
 a subtype of 
Concept
ShowPartsterm
t19829001 |Disorder of lung|
.

Scg expression
Borderridge
ShowFormatblock
	< 19829001 |Disorder of lung| . < 47429007 |Associated with| . 363698007 |Finding site|

This expression constraint is evaluated by first finding the descendants of 

Concept
ShowPartsterm
t19829001 |Disorder of lung|
, then finding the set of attribute values for these concepts (with an attribute type that is any subtype of 
Concept
ShowPartsterm
t47429007 |Associated with|
), and then from these attribute value concepts, finding the value of any 
Concept
ShowPartsterm
t363698007 |Finding sites|
 attribute. Please note that the expression constraint above (with no brackets) is equivalent to the one below (with brackets added).

Scg expression
Borderridge
ShowFormatblock
	((< 19829001 |Disorder of lung|) . < 47429007 |Associated with|) . 363698007 |Finding site|

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

...

Concept
t79654002 |Edema|
.

Scg expression
Borderridge
ShowFormatblock
	< 404684003 |Clinical finding|: * =

...

 79654002 |

...

Edema|

Using the long syntax, the above expression constraint may also be represented as:

Scg expression
Borderridge
ShowFormatblock
	descendantOf 404684003 |

...

Clinical finding|: ANY =

...

 79654002 |

...

Edema|

The 'star' symbol (i.e. "*") may also be used to represent any attribute value (either with or without refinement). The following expression constraint evaluates to the set of clinical findings which have an associated morphology (with any value).

Scg expression
Borderridge
ShowFormatblock
	< 404684003 |

...

Clinical finding|:

...

 116676008 |Associated morphology| = *

Using the long syntax, the above expression constraint may also be represented as:

Scg expression
Borderridge
ShowFormatblock
	descendantOf 404684003 |

...

Clinical finding|:

...

 116676008 |Associated morphology| =

...

 ANY 


...

Display Footnotes Macro