# Get a Concept, Description or Relationship

## Overview

The terminology content of SNOMED CT is represented by three types of uniquely identified components:

* A concept is a clinical idea to which a unique concept identifier has been assigned.
* A description is an association between a human-readable phrase (term) and a particular SNOMED CT concept.
* A relationship is an association between a source concept and a destination concept.

Each of these components is associated with a set of attributes that support interpretation of the component at a given point in time. The data structures of the components and the associations between them are documented in the [SNOMED CT Release File Specifications](https://app.gitbook.com/o/h8Z6qGxuQrzM9vbx5bPT/s/irKbJsZG57nSWZA4GT0M/).

## Requirements and Options

Getting data associated with identified concepts, descriptions or relationships is a fundamental requirement that must be met by any SNOMED CT terminology services provider. The required services are listed in the table below.

#### Services Required

<table data-full-width="false"><thead><tr><th width="155.125">Service Name and Status</th><th width="285.546875">Input</th><th>Output</th></tr></thead><tbody><tr><td><p><strong>Get concept by identifier</strong></p><p><strong>REQUIRED</strong><br></p></td><td><ul><li>Edition and version</li><li>A concept identifier</li><li>Optional: <a data-footnote-ref href="#user-content-fn-1">Language/dialect</a></li></ul></td><td><ul><li>Concept not found: Return appropriate error message.</li><li>Concept found: Return data associated with the concept.</li></ul></td></tr><tr><td><p><strong>Get description by identifier</strong></p><p><strong>REQUIRED</strong><br></p></td><td><ul><li>Edition and version</li><li>A description identifier</li></ul></td><td><ul><li>Description not found: Return appropriate error message.</li><li>Description found: Return data associated with the description.</li></ul></td></tr><tr><td><p><strong>Get relationship by identifier</strong></p><p><strong>REQUIRED</strong><br></p></td><td><ul><li>Edition and version</li><li>A relationship identifier.</li><li>Optional: Language/dialect<a href="https://confluence.ihtsdotools.org/display/DOCTSG/4.2+Get+a+Concept%2C+Description+or+Relationship#footnotes"><sup>1</sup></a></li></ul></td><td><ul><li>Relationship not found: Return appropriate error message.</li><li><p>Relationship found: Return data associated with the relationship conforming at least to the minimum set specified below:</p><ul><li>Minimum: All data for the identified relationship in the snapshot view of the requested edition and version.</li><li><p>Optional additional items:</p><ul><li>Preferred term and/or fully specified name for referenced concepts in a specified language</li><li>Other data associated with the referenced concepts.</li></ul></li></ul></li></ul></td></tr></tbody></table>

## Interdependencies

#### Required By

* Other terminology services
  * All except [4.1-select-edition-and-version](https://docs.snomed.org/snomed-ct-practical-guides/snomed-ct-terminology-services-guide/4-terminology-service-types/4.1-select-edition-and-version "mention").
* Use cases
  * [explore-and-review-snomed-ct](https://docs.snomed.org/snomed-ct-practical-guides/snomed-ct-terminology-services-guide/3-terminology-service-use-cases/explore-and-review-snomed-ct "mention")
  * [support-ehr-data-entry](https://docs.snomed.org/snomed-ct-practical-guides/snomed-ct-terminology-services-guide/3-terminology-service-use-cases/support-ehr-data-entry "mention")
  * [ehr-reporting-and-analytics](https://docs.snomed.org/snomed-ct-practical-guides/snomed-ct-terminology-services-guide/3-terminology-service-use-cases/ehr-reporting-and-analytics "mention")
  * [reference-set-editing](https://docs.snomed.org/snomed-ct-practical-guides/snomed-ct-terminology-services-guide/3-terminology-service-use-cases/reference-set-editing "mention")
  * [support-terminology-authoring-and-review](https://docs.snomed.org/snomed-ct-practical-guides/snomed-ct-terminology-services-guide/3-terminology-service-use-cases/support-terminology-authoring-and-review "mention")

#### Depends On

* Service Types
  * [4.1-select-edition-and-version](https://docs.snomed.org/snomed-ct-practical-guides/snomed-ct-terminology-services-guide/4-terminology-service-types/4.1-select-edition-and-version "mention")

## Service Examples

{% hint style="success" %}
The Snowstorm and FHIR examples are presented in plain text and URL encoded versions. Always use the "Encoded URL" when testing the example service requests. The plain text version is included to aid readability but using this version in a service request may result in errors. These errors result from characters that have to be encoded as they are not permitted in a URL (see [IETF RFC1738](https://www.ietf.org/rfc/rfc1738.txt)).
{% endhint %}

### Snowstorm API

<table data-full-width="true"><thead><tr><th width="164.1875">Service Name</th><th>API Call</th><th>Result</th></tr></thead><tbody><tr><td><strong>Get concept by identifier</strong></td><td><pre data-overflow="wrap"><code>GET [snowstorm]/[branchPath]/concepts/[conceptId]
</code></pre><p>for example</p><pre data-overflow="wrap"><code>GET [snowstorm]/MAIN%2F2020-01-31/concepts/6025007
</code></pre><hr><p><em>Encoded URL</em></p><pre data-overflow="wrap"><code>GET [snowstorm]/MAIN%2F2020-01-31/concepts/6025007
</code></pre></td><td><p>Returns a JSON representation of data related to the specified concept.</p><p>The data returned:</p><ul><li>Represents all the current data in the concept file row for the identified concept</li><li>Also includes the fully specified name and preferred term but does not include other synonyms</li><li><a data-footnote-ref href="#user-content-fn-2">Includes the definition status but does not include the stated or inferred definition of the concept</a>.</li></ul></td></tr><tr><td><strong>Get description by identifier</strong></td><td><pre data-overflow="wrap"><code>GET [snowstorm]/[branchPath]/descriptions/[descriptionId]
</code></pre><p>for example</p><pre data-overflow="wrap"><code>GET [snowstorm]/MAIN%2F2020-01-31/descriptions/2156578010
</code></pre><hr><p><em>Encoded URL</em></p><pre data-overflow="wrap"><code>GET [snowstorm]/MAIN%2F2020-01-31/descriptions/2156578010
</code></pre></td><td><p>Returns a JSON representation of data related to the specified description.</p><p>The data returned:</p><ul><li>Represents all the current data in the description file row for the identified description</li><li>Also includes the language acceptability data for the description derived from each of the language reference sets present in the specified edition</li><li>Also includes human readable symbolic names for concept enumerations (e.g. " type ": "SYNONYM", "caseSignificance": "CASE_INSENSITIVE" )</li></ul></td></tr><tr><td><strong>Get relationship by identifier</strong></td><td><pre data-overflow="wrap"><code>GET [snowstorm]/[branchPath]/concepts/[relationshipId]
</code></pre><p>for example</p><pre data-overflow="wrap"><code>GET [snowstorm]/MAIN%2F2020-01-31/relationships/3303602028
</code></pre><hr><p><em>Encoded URL</em></p><pre data-overflow="wrap"><code>GET [snowstorm]/MAIN%2F2020-01-31/relationships/3303602028
</code></pre></td><td><p>Returns a JSON representation of data related to the specified relationship.</p><p>The data returned:</p><ul><li>Represents all the current data in the relationship file row for the identified relationship</li><li>Also includes the fully specified name and preferred term for the source, type and target concepts</li></ul></td></tr></tbody></table>

{% hint style="info" %}
In the Snowstorm service requests \[snowstorm] should be replaced by the URL to the Snowstorm server endpoint.
{% endhint %}

### FHIR API

<table data-full-width="true"><thead><tr><th width="205.34765625">Service Name</th><th>API Call</th><th>Result</th></tr></thead><tbody><tr><td><strong>Get SNOMED CT concept by identifier</strong></td><td><pre data-overflow="wrap"><code>GET [fhir]/CodeSystem/$lookup?system=http://snomed.info/sct &#x26;code=[conceptId]&#x26;_format=json
</code></pre><p>for example</p><pre data-overflow="wrap"><code>GET [fhir]/CodeSystem/$lookup?system=http://snomed.info/sct &#x26;code=6025007&#x26;_format=json
</code></pre></td><td><p>Returns a JSON representation of information about the identified concept</p><p>The data returned includes:</p><ul><li>The effectiveTime and moduleId of the concept</li><li>Terms associated with descriptions as a display <em>designations</em> of the concept</li><li>A representation of the subtype relationships of the concept</li></ul></td></tr></tbody></table>

{% hint style="info" %}
In the FHIR service requests \[fhir] should be replaced by the URL to the FHIR terminology server endpoint. FHIR<sup>®</sup> is a registered trademarks of [HL7](http://www.hl7.org/) ([www.hl7.org](http://www.hl7.org/)).
{% endhint %}

### SQL Illustration

<table data-full-width="true"><thead><tr><th width="180.12109375">Service Name</th><th width="330.79296875">SQL Query</th><th>Result</th></tr></thead><tbody><tr><td><strong>Get concept by identifier</strong></td><td><pre class="language-sql" data-overflow="wrap"><code class="lang-sql"><strong>SELECT * FROM snap_concept WHERE id=[conceptId]
</strong></code></pre><p>for example</p><pre class="language-sql" data-overflow="wrap"><code class="lang-sql">SELECT * FROM snap_concept WHERE id=6025007
</code></pre></td><td>Returns a row of data from the concept release file for the specified concept.</td></tr><tr><td><strong>Get description by identifier</strong></td><td><pre class="language-sql" data-overflow="wrap"><code class="lang-sql">SELECT * FROM snap_description WHERE id=[descriptionId]
</code></pre><p>for example</p><pre class="language-sql" data-overflow="wrap"><code class="lang-sql">SELECT * FROM snap_description WHERE id=2156578010
</code></pre></td><td>Returns a row of data from the description release file for the specified description.</td></tr><tr><td><strong>Get relationships by identifier</strong></td><td><pre class="language-sql" data-overflow="wrap"><code class="lang-sql">SELECT * FROM snap_relationship WHERE id=[relationshipId]
</code></pre><p>for example</p><pre class="language-sql" data-overflow="wrap"><code class="lang-sql">SELECT * FROM snap_relationship WHERE id=3303602028
</code></pre></td><td>Returns a row of data from the relationship release file for the specified relationship.</td></tr></tbody></table>

{% hint style="info" %}
The SNOMED CT MySQL example database is **not** designed as a terminology server and is **not** intended for use in a live system . However, it is referenced in this guide as an illustration that some readers may find helpful. For more information about the SNOMED CT example database see the SNOMED CT - SQL Practical Guide.
{% endhint %}

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=SNOMED+Terminology+Services+Guide&#x26;entry.670899847=Get%20a%20Concept%2C%20Description%20or%20Relationship" class="button primary">Provide Feedback</a>

[^1]: Language and/or dialect should be specified if the service returns terms associated with referenced concepts.

[^2]: Data in the definitionStatusId and active columns is represented as symbolic names rather than the boolean and SCTID data types used in release file columns.


---

# 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-terminology-services-guide/4-terminology-service-types/4.2-get-a-concept-description-or-relationship.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.
