> 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/4-logical-model.md).

# Logical Model

A SNOMED CT template is a SNOMED CT expression, expression constraint, or query that contains one or more *slots.* Each template slot either provides information as to how the template should be processed (i.e. an information slot), or serves as a placeholder for a specific value that may be completed at a subsequent time. Each replacement slot may have a replacement type (e.g. concept, expression, token, string, integer, decimal or boolean), a slot name, and a replacement constraint. Depending on the replacement type, the replacement constraint may either be an expression constraint, a value list constraint or a range constraint. Each information slot may have a cardinality and a slot name.

## Logical Model

The SNOMED CT template syntax defines the syntax used for these slots, irrespective of the computable language in which they are embedded. Figure 4-1 below illustrates the abstract model of the SNOMED CT template syntax. Please note that no specific semantics should be attributed to each arrow in this diagram.

<figure><img src="https://2822876636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzMLFwMoInWP79jP2Up2p%2Fuploads%2Fgit-blob-0e082e3fb58e6c88b94eda558ad5376751e3959f%2F45518197.jpg?alt=media" alt=""><figcaption><p>Figure 4-1: Abstract model of SNOMED CT Template Syntax</p></figcaption></figure>

## UML Class Diagram

The figure below provides a non-normative representation of the logical model of the SNOMED CT Template Syntax using a UML class diagram.

Please note that each of the classes in this diagram corresponds to a rule in the syntax specification defined in [Syntax Specification](https://docs.snomed.org/snomed-ct-specifications/snomed-ct-template-syntax-specification/5-syntax-specification.md). For a short description of each of these, please refer to [Informative Comments](https://docs.snomed.org/snomed-ct-specifications/snomed-ct-template-syntax-specification/5-syntax-specification/5.2-informative-comments.md).

<figure><img src="https://2822876636-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzMLFwMoInWP79jP2Up2p%2Fuploads%2Fgit-blob-3ff2b30d90ebcd720c40c7a55ef00ed2b5639b65%2F115867784.png?alt=media" alt=""><figcaption><p>Figure 4.1-1: UML class diagram of template syntax</p></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=Logical%20Model" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snomed.org/snomed-ct-specifications/snomed-ct-template-syntax-specification/4-logical-model.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
