# Authoring of Precoordinated Concepts

Expression templates can be used to author precoordinated clinical meanings by providing reusable patterns for the definition of similar concepts. Expression templates can define the set of attributes and attribute values that may be used to define concepts in a specific hierarchy or subhierarchy, thereby assisting SNOMED CT authors to create concepts in a consistent way. They can also be used together with an input file to either create or update batches of concepts very efficiently. Using expression templates to author SNOMED CT concepts can help to improve the quality of the terminology, by controlling the consistency of the definitions, and by validating concept definition against appropriate templates. Similarly, they can also be used as a metric to measure the quality of given subhierarchy.

In summary, expression templates can be used by terminology authors to:

* Create a single concept, or a batch of concepts;
* Update the definition of a concept (or batch of concepts) to conform to a particular pattern;
* Validate the definition of concept or a set of concepts;
* Define quality metrics for a particular subhierarchy.

The example below shows an expression template that may be used to define computed tomography (CT) concepts of a particular body site (e.g. CT of right arm). The 'bodysite' slot represents the placeholder, which is subsequently replaced with a specific body site concept to form a complete concept definition.

{% tabs fullWidth="false" %}
{% tab title="Diagram and Expression Template" %}

<figure><img src="https://2822876636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzMLFwMoInWP79jP2Up2p%2Fuploads%2Fgit-blob-c09653d0b9b92388b4ca237637ca38b08b7af7d4%2F45517718.png?alt=media" alt=""><figcaption></figcaption></figure>

***

{% @snomed-syntax-highlighter/snomed-syntax-highlighter lines="5" content="71388002 |Procedure|: { 363704007 |Procedure site| = \[\[+id @bodysite]], 260686004 |Method| = 312251004 |Computed tomography imaging action| }" processed="true" %}
{% endtab %}
{% endtabs %}

**Example:** An example expression template

The following examples show the expressions that result when processing the template using a specific slot value:

{% tabs %}
{% tab title="Example 1" %}
**bodySite:**

{% @snomed-syntax-highlighter/snomed-syntax-highlighter lines="1" content="48979004 |Structure of left lower leg (body structure)|" %}

**Resulting Expression:**

{% @snomed-syntax-highlighter/snomed-syntax-highlighter lines="5" content="71388002 |Procedure|: { 363704007 |Procedure site| = 48979004 |Structure of left lower leg| , 260686004 |Method| = 312251004 |Computed tomography imaging action| }" processed="true" %}
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Example 2" %}
**bodySite:**

{% @snomed-syntax-highlighter/snomed-syntax-highlighter lines="1" content="368209003 |Right upper arm structure (body structure)|" %}

**Resulting Expression:**

{% @snomed-syntax-highlighter/snomed-syntax-highlighter lines="5" content="71388002 |Procedure| : { 363704007 |Procedure site| = 368209003 |Right upper arm structure| , 260686004 |Method| = 312251004 |Computed tomography imaging action| }" processed="true" %}
{% endtab %}
{% endtabs %}

**Example**: Expressions that result from populating the example expression template

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=SNOMED+Template+Syntax+Specification&#x26;entry.670899847=Authoring%20of%20Precoordinated%20Concepts" class="button primary">Provide Feedback</a>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.snomed.org/snomed-ct-specifications/snomed-ct-template-syntax-specification/2-use-cases/2.1-authoring-of-precoordinated-concepts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
