> 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-compositional-grammar-specification/implementation-guidance/7.4-storing.md).

# Storing

Storing SNOMED CT postcoordinated expressions in Electronic Health Records enables clinical systems to capture a wider range of clinical meanings than would be possible using precoordinated expressions alone. When storing postcoordinated expressions written using SNOMED CT Compositional Grammar in health records, a number of options are available including:

* Storing the entire expression as a string in the relevant field of the patient's record. This requires the maximum length of the field to be large enough to support the required expressions;
* Storing a list of expressions in an *Expressions* table, and associating each expression with a local identifier.. These local expression identifiers are then stored within the relevant field of the patient's record. The *Expressions* table enables a lookup service to match the local expression identifier stored in the patient's record with the associated postcoordinated expression. This allows shorter identifier strings to be recorded within the patient record, instead of the longer postcoordinated expressions. While this approach may have a slightly detrimental effect on the retrieval of a patient record, it can reduce the storage requirements and enable indexing over expressions for faster searching. These local identifiers, however, cannot be shared with other applications, which do not have access to the associated postcoordinated expressions;
* Using a shared expression repository to generate expression identifiers that can be stored in the relevant field of the patient's record. This approach allows shorter identifiers to be recorded in the patient records (as per the previous approach), while using identifiers which can be shared between applications that share access to the same expression repository.

Please note that while transforming an expression to other equivalent forms (e.g. a normal form) may be useful to support effective data retrieval, even minor corrections to the definition of a concept in future releases may significantly alter the resulting form of the same expression. Therefore it is recommended that:

* The primary or original record should be stored using the representation that is as close as possible to the form in which it was recorded;
* If transformations to alternative representations are used to enhance the efficiency of retrieval, these should be stored as secondary supporting tables or indices. This has the advantage that these alternative forms can be regenerated based on the most up to date set of definitions when a new release of SNOMED CT is installed, without affecting the integrity of the original records.

For alternative approaches for storing postcoordinated expressions, that do not use SNOMED CT Compositional Grammar.

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=Compositional-Grammar-Specification&#x26;entry.670899847=Storing" 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-compositional-grammar-specification/implementation-guidance/7.4-storing.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.
