SNOMED Documentation Search
In addition to the simple examples shown on the previous pages, more advanced expression templates can also be used. On this page we show some examples of expression constraints with multiple replacement slots, multiple cardinality constraints and slot co-dependency constraints.
In many situations, it is useful for an expression template to contain more than one replacement slot. Below are some examples.
The following expression template uses three replacement slots to generate an expression that represents a type of procedure. The first slot (named "Procedure") is a placeholder for the focus concept, while the second slot (named "BodySite") is a placeholder for the | Procedure site - Direct| , and the third slot (named "Method") is a placeholder for the | Method| .
then the following expression would be generated.
Another example of an expression template with multiple slots is shown below. This expression template is used to generate expressions that represent the family history of a patient. The template contains two slots - the first slot (named "Finding") is a placeholder for the | Clinical finding| known to be present in the family member, while the second slot (named "Relationship") is a placeholder for the | Subject relationship context| of this | Clinical finding| .
Finding | Relationship |
---|---|
Then the following family history expressions would be generated.
Expression templates may also use more than one cardinality constraint to indicate the repeatability of different parts of the expression. Below are some examples.
The following expression template uses three replacement slots to generate an expression that represents a type of procedure. The first slot (named "Procedure") is a placeholder for the focus concept, while the second slot (named "BodySite") is a placeholder for the | Procedure site - Direct| , and the third slot (named "Method") is a placeholder for the | Method| .
The following input data satisfies these cardinality constraints.
Procedure | SMgroup | BodySite | Method |
---|---|---|---|
1 | |||
2 | |||
1 |
If the slots are populated with the values above, then the following expressions would be generated.
Another example of an expression template with multiple cardinality constraints is shown below. This expression template is used to generate expressions that represent a clinical finding with explicit context.
Condition | AF group | Finding | Severity | Site | Relationship | Time | Context |
---|---|---|---|---|---|---|---|
1 | |||||||
2 | |||||||
1 | |||||||
1 |
Please note that when part of an expression is repeated, connectors (e.g. a comma) must be added between the parts during processing. Similarly, when part of an expression is absent then clean up is required (e.g. to remove commas and brackets). For more information on these processing steps, please refer to 7.2. Template Processing.