> 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-practical-guides/snomed-ct-postcoordination-guide/expressions-in-the-ehr/entering-expressions-in-an-ehr/form-based-entry-of-expressions.md).

# Form-based Entry of Expressions

With this approach, using an expression template can help to ensure that the selected values are added in the appropriate places within the expression.

The example shown in the image below illustrates how an expression template is used to apply a laterality to a selected diagnosis. In this example, if a user enters the values *Open fracture of radius* as the diagnosis, and the value *left* in the side field, the values entered are then used to populate the slots in the expression template and form an expression representing the meaning of an 'open fracture of radius with a laterality of left'.

<figure><img src="/files/0uhGrUH2iuHcIt731A21" alt=""><figcaption><p>In this example, the value of the 'diagnosis' field and the value of the 'side' field are used to represent different parts of the resulting expression.</p></figcaption></figure>

Expression templates associated with a data entry form should be created during the design phase of the implementation, and then populated with values at run time, when the user selects values in each field. Please see section /expression template [https://github.com/SNOMED-Documents/snomed-postcoordination-guide/blob/main/4-expressions-in-the-ehr/4.1-preparing-expression-repository/4.1.3-creating-expressions.md#id-4.1.3.3-expression-templates](https://github.com/SNOMED-Documents/snomed-postcoordination-guide/blob/main/4-expressions-in-the-ehr/4.1-preparing-expression-repository/4.1.3-creating-expressions.md#id-4.1.3.3-expression-templates "mention")for details on expression templates.

When using the form-based approach for entering postcoordinated expressions in an EHR, it is recommended to store the data in an information structure that matches the fields on the form and to record the concept identifier and display term for each of the fields, within that information structure. This enables the system to efficiently display health records that have been recorded previously, and also provides full traceability of what the user selected at the point of data entry. It also enables the possibility of re-generating a postcoordinated expression at a later date that is potentially different from that which was originally generated, e.g. if an error were found in the original template or if structural changes in SNOMED force a redesign of the expression template.

In addition to the storage of the individual concept identifiers, the derived expression (in terse form) may also be stored to meet specific EHR-requirements. Generating the derived expression may be done using an expression template.

**Terminology services**

Enabling form-based entry of expressions in the EHR requires the EHR to dynamically access at runtime SNOMED CT concepts as determined by the terminology binding specified for each data element. At the point of data entry, no specific services for postcoordination are required, however, if the resulting expression is stored as a single expression, or subsequently communicated, terminology services are required to add the expression to the expression repository.\
For this purpose, the following services are required:

* [Add Expression](https://github.com/SNOMED-Documents/snomed-postcoordination-guide/blob/main/expressions-in-the-ehr/entering-expressions-in-an-ehr/broken-reference/README.md) (including required sub-services)

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=Postcoordination+Guide&#x26;entry.670899847=Form-based%20Entry%20of%20Expressions" 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-practical-guides/snomed-ct-postcoordination-guide/expressions-in-the-ehr/entering-expressions-in-an-ehr/form-based-entry-of-expressions.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.
