> For the complete documentation index, see [llms.txt](https://docs.snomed.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snomed.org/snomed-ct-specifications/snomed-ct-template-syntax-specification/2-use-cases/2.2-defining-postcoordinated-clinical-meanings.md).

# Defining Postcoordinated Clinical Meanings

Expression templates can be used to enable the easy and consistent authoring of postcoordinated expressions. They are particularly useful in situations where a specific pattern is needed to support the entry, storage or retrieval of SNOMED CT expressions. Therefore, expression templates are useful for:

* Creating batches of postcoordinated expressions with a consistent structure; and
* Composing postcoordinated expressions from data entered into a user interface.

These uses are explained in more detail in the following sections.

## Batch Authoring of Expressions

Expression templates may be applied to ensure a consistent structure is used by a set of authored expressions. For example, there may be a preference to always represent allergies using an expression in which the allergen is explicitly defined as the value of the [| Causative agent|](http://snomed.info/id/246075003) attribute. Given an appropriate expression template and a predefined list of allergen substances, a set of postcoordinated expressions can automatically be batch authored (as shown below).

**Expression Template**

[419199007 |allergy to substance|](http://snomed.info/id/419199007) : [246075003 |Causative agent|](http://snomed.info/id/246075003) = \[\[+id @Substance]]

**List of Substances**

[256259004 |Pollen|](http://snomed.info/id/256259004)\
[89811004 |Gluten|](http://snomed.info/id/89811004)\
[47703008 |Lactose|](http://snomed.info/id/47703008)\
[13577000 |Nut|](http://snomed.info/id/13577000)\
[33396006 |Nickel|](http://snomed.info/id/33396006)

**Resulting Expressions**

[419199007 |Allergy to substance|](http://snomed.info/id/419199007) : [246075003 |Causative agent|](http://snomed.info/id/246075003) = [256259004 |Pollen|](http://snomed.info/id/256259004)\
[419199007 |Allergy to substance|](http://snomed.info/id/419199007) : [246075003 |Causative agent|](http://snomed.info/id/246075003) = [89811004 |Gluten|](http://snomed.info/id/89811004)\
[419199007 |Allergy to substance|](http://snomed.info/id/419199007) : [246075003 |Causative agent|](http://snomed.info/id/246075003) = [47703008 |Lactose|](http://snomed.info/id/47703008)\
[419199007 |Allergy to substance|](http://snomed.info/id/419199007) : [246075003 |Causative agent|](http://snomed.info/id/246075003) = [13577000 |Nut|](http://snomed.info/id/13577000)\
[419199007 |Allergy to substance|](http://snomed.info/id/419199007) : [246075003 |Causative agent|](http://snomed.info/id/246075003) = [33396006 |Nickel|](http://snomed.info/id/33396006)

## Composing Expressions from a User Interface

Expression Templates are also useful for creating postcoordinated expressions from data entered in a user interface. For example, a radiology user interface may use two separate fields to capture the imaging procedure and the body site to which the procedure was applied. An expression template can then be applied to combine the data entered into these two fields into a single postcoordinated expression (see diagram below).

<figure><img src="/files/ScZdWNZx2mr0wSkUX8AY" alt=""><figcaption></figcaption></figure>

<figure><img src="https://github.com/SNOMED-Documents/snomed-termplate-syntax-specification/blob/main/2%20use-cases/plugins/servlet/confluence/placeholder/unknown-macro" alt=""><figcaption></figcaption></figure>

<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=2.2.%20Defining%20Postcoordinated%20Clinical%20Meanings" class="button primary">Provide Feedback</a>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.snomed.org/snomed-ct-specifications/snomed-ct-template-syntax-specification/2-use-cases/2.2-defining-postcoordinated-clinical-meanings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
