> 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/appendixes/appendix-a-techniques-for-autogenerating-display-terms.md).

# Appendix A: Techniques for Autogenerating Display Terms

Three different approaches to automatically creating display terms for postcoordinated expressions are presented, ranging from the simplest to the more complex.

1. Replace concept identifiers with terms
2. Apply simple term rules
3. Apply description templates and rules

Please note that alternative, and more advanced approaches are possible.

When deciding what approach to apply, the following questions need to be considered:

* How close does the term need to match the spoken clinical language?
* Are resources available to develop and maintain the transformation rules and templates?

## Replace Concept Identifiers with Terms

The simplest approach to generating display terms for a postcoordinated expression is to simply replace the concept identifiers with a term or description associated with the concept (preferably the preferred term of the applied language reference set). The result of this transformation leads to an expression that doesn't match the clinical language, but it may still be sufficient for the end-users to correctly interpret the semantics of the expression. The table below shows examples of this approach.

#### Examples

In the following examples, the concept identifiers are replaced with the preferred term of each concept\
\&#xNAN;*(in the US language reference set)*

<table><thead><tr><th width="316.296875">Expression</th><th>Term</th></tr></thead><tbody><tr><td><code>397181002:363698007=23416004</code></td><td>"|Open fracture|:|Finding site|=|Bone structure of ulna|"</td></tr><tr><td><code>336863008:272741003=7771000</code></td><td>“|Excision of cyst of lung|:|Laterality|=|Left|”</td></tr></tbody></table>

## Simple Term Rules

To increase the human readability of the expressions, simple term rules can be applied in conjunction with the replacement of concept identifiers. Part of this involves avoiding the use of compositional grammar symbols in the terms, which can be achieved in different ways, e.g.

* Replace symbols with predefined terms
* Remove symbols and replace attributes with a ","

The table below exemplifies the transformation rules that can be used to replace compositional grammar symbols.

| Symbol | Term             |
| ------ | ---------------- |
| :      | with a / with an |
| =      | of               |
| ,      | and              |
| +      | and              |

#### Examples

In the following two examples, the following approach has been taken to generate the display term.

* Concept identifiers are replaced with the preferred term of each concept (in the US language reference set)
* Compositional grammar symbols are replaced with a predefined term

<table><thead><tr><th width="286.88671875">Expression</th><th>Display Term</th></tr></thead><tbody><tr><td><code>397181002:363698007=23416004</code></td><td>"open fracture with a finding site of bone structure of ulna"</td></tr><tr><td><code>336863008:272741003=7771000</code></td><td>“excision of cyst of lung with a laterality of left”</td></tr></tbody></table>

In the following two examples, the following approach has been taken to generate the display term.

* Concept identifiers are replaced with the preferred term of each concept (in the US language reference set)
* Compositional grammar symbols are removed and attributes are replaced with a ","

<table><thead><tr><th width="299.8125">Expression</th><th>Term</th></tr></thead><tbody><tr><td><code>397181002:363698007=23416004</code></td><td>"open fracture, ulna"</td></tr><tr><td><code>336863008:272741003=7771000</code></td><td>“excision of cyst of lung, left”</td></tr></tbody></table>

## Description Templates

In some situations, description templates may be applied to ensure that the display terms of the expressions match the clinically spoken language more closely. This approach may be particularly appropriate to consider in situations where the postcoordinated expressions were originally generated using an expression template. In these cases, a corresponding description template and associated term rules may be developed more easily than when the expression was built by another method.

The following illustrates the expression template, description template and term rules for creating expressions that represent a disorder with a fracture morphology and a finding site of some bone structure. The description template specifies that the term associated with the morphology concept is always followed by the term associated with the bone structure concept, and these two terms should be separated by the term ‘of’. Associated with this description template is a set of term rules, but please note that in a real implementation, additional rules may be included to refine the transformation and ensure a proper transformation in all cases .

#### Templates

<table><thead><tr><th width="490.296875">Expression template</th><th>Description template</th></tr></thead><tbody><tr><td><p><code>[[+id(&#x3C;&#x3C; 64572001 |Disease| @disorder]]:</code></p><p><code>[[1..*]] {</code></p><p><code>[[1..1]] 116676008 |Associated morphology| =</code><br><code>[[+id(&#x3C;&#x3C; 72704001 |Fracture| </code><strong><code>@fractureMorphology</code></strong><code>]],</code></p><p><code>[[1..1]] 363698007 |Finding site| =</code><br><code>[[+scg (&#x3C;&#x3C; 272673000 |Bone structure|) </code><strong><code>@boneStructure</code></strong><code>]] }</code></p></td><td><code>[[</code><strong><code>$fractureMorphology</code></strong><code>]] of [[</code><strong><code>$boneStructure</code></strong><code>]]</code></td></tr></tbody></table>

#### Description Generation Rules

| Expression Slot         | Term Rule                                                                                                                                                                                                                                                                         |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **$boneStructure**      | <ul><li>Use the FSN</li><li>Remove the semantic tag (body structure)</li><li><p>Remove prefix, such as:</p><ul><li><em>'Bone structure of'</em></li><li><em>'Structure of'</em></li></ul></li><li><p>Remove postfix, such as:</p><ul><li><em>'structure'</em></li></ul></li></ul> |
| **$fractureMorphology** | <ul><li>Use the FSN</li><li>Remove the semantic tag (morphologic abnormality)</li><li>Remove the "," separating the morphologies, if two appear, and swap the terms</li></ul>                                                                                                     |

The following two examples show of how a description template and a few term transformation rules can lead to human-readable display terms.

#### Example: "open fracture of ulna"

<table><thead><tr><th width="248.30078125">Expression Slot</th><th>Term Transformation</th></tr></thead><tbody><tr><td>@fractureMorphology</td><td>fracture, open (morphologic abnormality) → <strong>open fracture</strong></td></tr><tr><td>@boneStructure</td><td>bone structure of ulna (body structure) → <strong>ulna</strong></td></tr></tbody></table>

#### Example: "closed fracture of distal ulnar epiphysis"

<table><thead><tr><th width="201.26171875">Expression Slot</th><th>Term Transformation</th></tr></thead><tbody><tr><td>@fractureMorphology</td><td>fracture, closed (morphologic abnormality) → <strong>closed fracture</strong></td></tr><tr><td>@boneStructure</td><td>structure of distal ulnar epiphysis (body structure) → <strong>distal ulnar epiphysis</strong></td></tr></tbody></table>

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=Postcoordination+Guide&#x26;entry.670899847=Appendix%20A%3A%20Techniques%20for%20Autogenerating%20Display%20Terms" 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/appendixes/appendix-a-techniques-for-autogenerating-display-terms.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.
