SNOMED Documentation Search


Versions Compared

Key

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

To avoid any confusion and misinterpretation it is important that the input data is represented in a way that ease the interpretation of the input data and ensure correct processing of the expression template. Poorly represented input data may result in expressions that express a different meaning than intended, which can be critical if the resulting expressions are used for safety critical purposes (storage, communication, trigger decision support rules etc.)

Templates with Repeatability of Groups and Attributes

In situations where the template allow for attribute-value pairs or relationships groups to be repeated, the input data should be explicit about 

...

 

@Expression

@Group

@Site

@Morphology

1

1

Concept
t312763008 |Bone structure of trunk|


Concept
t72704001 |Fracture|

2

Concept
t84667006 |Bone structure of cervical vertebra|

Concept
t72704001 |Fracture|

2

1

Concept
t62413002 |Bone structure of radius|

Concept
t72704001 |Fracture|

Concept
t23416004 |Bone structure of ulna|

Concept
t72704001 |Fracture|

3

1

Concept
t71341001 |Bone structure of femur|

 

Concept
t72704001 |Fracture|

4

1

Concept
t12611008 | Bone structure of tibia|

Concept
t72704001 |Fracture|

 

The above input data would result in following four expressions to be generated when processing the template:

Expression
1


Scg expression
64572001 |Disease| : { 
  363698007 |Finding site| = 312763008 |Bone structure of trunk|,
 116676008 |Associated morphology |= 72704001 |Fracture| },
{ 363698007 |Finding site| = 84667006 |Bone structure of cervical vertebra|,
 116676008 |Associated morphology|  = 72704001 |Fracture| }


2


Scg expression
64572001 |Disease| : { 
  363698007 |Finding site|  = (62413002 |Bone structure of radius| + 23416004 |Bone structure of ulna|),
 116676008 |Associated morphology|  = 72704001 |Fracture| }


3


Scg expression
64572001 |Disease| : { 
363698007 |Finding site| = 71341001 |Bone structure of femur|,
 116676008 |Associated morphology|  = 72704001 |Fracture| }


4


Scg expression
64572001 |Disease| : { 
  363698007 |Finding site|  = 12611008 | Bone structure of tibia|,
 116676008 |Associated morphology|  = 72704001 |Fracture| } 



Templates with Cardinality Constraints

Specifying the expression and group when representing input data is particularly important when the template includes cardinality constraints, to be able to determine the repeatability of groups and attributes. Expression templates which specifies a [1..1] cardinality of slots or expression parts can omit the group column, as shown in the following example.  

Cardinality Constraints on Groups

Consider the following template, where the template includes a cardinality constraint on the group like this:

...

 

@Expression

@Group

@Site

@Morphology

Processing Result
1

1

Concept
t312763008 |Bone structure of trunk|


Concept
t72704001 |Fracture|

INVALID

Only one group is allowed due to cardinality constraints

2

Concept
t84667006 |Bone structure of cervical vertebra|

Concept
t72704001 |Fracture|

2

 

1

Concept
t62413002 |Bone structure of radius|

Concept
t72704001 |Fracture|

VALID

1

Concept
t23416004 |Bone structure of ulna |

Concept
t72704001 |Fracture|

3

1

Concept
t71341001 |Bone structure of femur|

Concept
t72704001 |Fracture)|

VALID
4

1

Concept
t12611008 | Bone structure of tibia|

Concept
t72704001 |Fracture|

VALID

 

So in this case, there would be no need to include the second column in the input data to differentiate between different groups in the same expression. Hence, the input data could be simplified as:

 
@Expression

@Site

@Morphology

2

 

Concept
t62413002 |Bone structure of radius|

Concept
t72704001 |Fracture|

Concept
t23416004 |Bone structure of ulna |

Concept
t72704001 |Fracture|

3

Concept
t71341001 |Bone structure of femur|

Concept
t72704001 |Fracture)|

4

Concept
t12611008 | Bone structure of tibia|

Concept
t72704001 |Fracture|

 

Cardinality Constraints on Attributes


Consider the following template, where the template includes a cardinality constraint on each attribute like this:

 

Scg expression
Bordersolid
[[@Expression ]] 64572001 |Disease| : [[1..*]] 
[[1..1 @Group]]{ [1..1] 363698007 |Finding site|  =  [[+ (<< 272673000 |Bone structure| ) @Site]],
  [1..1] 116676008 |Associated morphology|  =  [[+ (<< 72704001 |Fracture| ) @Morphology]] }
 


...

@Site

@Morphology

Concept
t71341001 |Bone structure of femur|

Concept
t72704001 |Fracture)|

Concept
t12611008 | Bone structure of tibia|

Concept
t72704001 |Fracture|

Summary

In summary, it is recommended to be as explicit as possible when specifying input data for expression templates. However, in situations the input data can be simplified, and then following default can be  assumed by the input data:

...