# Preparing Expression Repository

Enabling postcoordination in an EHR may involve the preparation of an expression repository. This involves the actual creation of the expression repository and often the addition of a set of postcoordinated expressions to be included in the value sets of the EHR.

## Creating and Expression Repository

To enable expressions to be stored and accessed in the terminology server, the expression repository first needs to be created.

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

A SNOMED CT-enabled expression repository is not a standalone artifact. The expression repository is tightly coupled with the terminology repository in the sense that all expressions represented in the expression repository are composed of concepts included in the applied terminology repository, i.e. a specific version of a SNOMED CT Edition. The terminology content on which the expression repository depends is also referred to as the substrate. When a terminology repository is updated to include a new version of SNOMED CT, the expression repository will equally need to be updated to align with the applied terminology content.

{% hint style="info" %}
The services required by a terminology server to create an expression repository are described in [Create Expression Repository](https://github.com/SNOMED-Documents/snomed-postcoordination-guide/blob/main/expressions-in-the-ehr/preparing-expression-repository/broken-reference/README.md)\
\
The overall requirements for updating an expression repository are described in [Update Expression Repository](https://github.com/SNOMED-Documents/snomed-postcoordination-guide/blob/main/expressions-in-the-ehr/preparing-expression-repository/broken-reference/README.md)
{% endhint %}

## Adding Expressions to Repository

Depending on the choices made as part of a SNOMED CT implementation project, the addition of expressions to an expression repository may be done at various stages of implementation and by different users. For example:

* Some implementations may restrict the creation of expressions to only during the implementation stage, where
  * Expressions are created by people involved with the implementation
  * Expressions are added to the expression repository to be made available for end users in the same way as precoordinated SNOMED CT content. By this approach, the end users can not themselves directly create new postcoordinated expressions
* Some implementations may enable runtime creation of postcoordinated expressions by end users, where
  * Expressions are created by end-users as part of the data entry process
  * Expressions are added to the expression repository as part of saving patient data in the EHR record store.

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

{% hint style="info" %}
The services required by the terminology server to add expressions to an expression repository are described in [Add Expression](https://github.com/SNOMED-Documents/snomed-postcoordination-guide/blob/main/expressions-in-the-ehr/preparing-expression-repository/broken-reference/README.md).
{% endhint %}

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=Postcoordination+Guide&#x26;entry.670899847=Preparing%20Expression%20Repository" 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-practical-guides/snomed-ct-postcoordination-guide/expressions-in-the-ehr/preparing-expression-repository.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.
