# Validate Concept Definitions and Expressions

## Overview

#### Concept Definitions

A concept definition is a set of one or more axioms that partially or sufficiently specify the meaning of a SNOMED CT concept.

## **Concept Definition Validation Requirements**

Concept definitions must conform to the SNOMED CT Concept Model as specified by the machine readable concept model. A concept with a definition that does not conform to the concept model cannot be accurately classified.

## **Service Requirements for Concept Definition Validation**

* Terminology services supporting SNOMED CT authoring **must** validate concept definitions based on concept model rules.
* Services only for terminology use **do not** need to meet this requirement.

### SNOMED CT Expressions

An expression is a structured combination of one or more concept identifiers that represents an idea.

**Example**

{% code overflow="wrap" %}

```
284196006:363698007=770850006
```

{% endcode %}

**Example (with terms)**

{% code overflow="wrap" %}

```
284196006 |burn of skin| : 363698007 |finding site| = 770850006 |Skin structure of left index finger|
```

{% endcode %}

### **Expression Validation Requirements**

Expressions should conform to the SNOMED CT Concept Model and be classifiable by a [description logic classifier](https://confluence.ihtsdotools.org/display/WIPGLOSS/description+logic+classifier).

**Transforming Invalid Expressions to Valid Expressions**

* Move refining attributes into valid groups.
* Nest refinements where required.
* Move context attributes into a context wrapper.

**Example Transformation (Laterality applied to body structure):** Invalid:

{% code overflow="wrap" %}

```
71620000 |fracture of femur| : 272741003 |laterality| = 7771000 |left|
```

{% endcode %}

Valid:

{% code title="" %}

```
=== 7523003 |Injury of thigh| +
    46866001 |Fracture of lower limb| :
        { 363698007 |Finding site| = ( 71341001 |Bone structure of femur| :
            272741003 |laterality| = 7771000 |left| ),
          116676008 |Associated morphology| = 72704001 |Fracture| }
```

{% endcode %}

**Service Requirements for Expression Validation**

Services supporting use of [postcoordinated expressions](https://confluence.ihtsdotools.org/display/WIPGLOSS/postcoordinated+expression) should support expression validation.

## Requirements and Options

Services Required

| Service Name and Status                                                                                       | Input                                                                                                                                                                                                                                               | Response                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>Validate expression</strong></p><p><strong>RECOMMENDED</strong><br></p>                            | <ul><li>Edition and Version</li><li>Expression to be validated</li><li>Optional: Language/dialect<a href="https://confluence.ihtsdotools.org/display/DOCTSG/4.14+Validate+Concept+Definitions+and+Expressions#footnotes"><sup>1</sup></a></li></ul> | <ul><li>Indication of whether the expression is valid or invalid</li><li><p>If the expression is invalid an indication of the reason for failure of validation<br></p><ul><li><p>Syntax error including:</p><ul><li>Character position of first syntax error, and/or</li><li>More specific error message(s).</li></ul></li><li><p>Concept model validation error including:</p><ul><li>Character position of start of invalid element and/or</li><li>Reference to failed concept model rule(s).</li></ul></li><li><p>Terming errors including:</p><ul><li>Indication of any terms in the expression that do not match valid descriptions for the identified concept.</li></ul></li></ul></li></ul> |
| <p><strong>Transform invalid expression</strong></p><p><strong>OPTIONAL</strong><br></p>                      | <ul><li>Edition and Version</li><li>Invalid candidate expression for adjustment</li></ul>                                                                                                                                                           | <ul><li>Structurally adjusted valid expression</li><li>An error message if it is not possible to transform to valid expression</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| <p><strong>Validate concept definition(s)</strong></p><p><strong>ONLY REQUIRED FOR AUTHORING</strong><br></p> | <ul><li>Edition and Version</li><li>Identifier(s) of concept(s) to be validated</li></ul>                                                                                                                                                           | <ul><li><p>Indication of validation results for one or more concepts including</p><ul><li>Nature of error</li><li>If appropriate a reference to a failed concept model rule</li></ul></li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

### Interdependencies

#### Required By

* [3.2.3 EHR Data Entry](https://confluence.ihtsdotools.org/display/WIPTSG/3.2.3+EHR+Data+Entry)
* [3.2.2 EHR Data Entry Design](https://confluence.ihtsdotools.org/display/WIPTSG/3.2.2+EHR+Data+Entry+Design)
* [3.8 Support Terminology Authoring and Review](https://confluence.ihtsdotools.org/display/WIPTSG/3.8+Support+Terminology+Authoring+and+Review)

#### Depends On

* [4.1 Select Edition and Version](https://confluence.ihtsdotools.org/display/WIPTSG/4.1+Select+Edition+and+Version)
* [4.2 Get a Concept, Description or Relationship](https://confluence.ihtsdotools.org/display/WIPTSG/4.2+Get+a+Concept%2C+Description+or+Relationship)
* [4.3 Get Terms for a Concept](https://confluence.ihtsdotools.org/display/WIPTSG/4.3+Get+Terms+for+a+Concept)
* [4.4 Get Definition of a Concept](https://confluence.ihtsdotools.org/display/WIPTSG/4.4+Get+Definition+of+a+Concept)
* [4.5 Get and Test Concept Subtypes and Supertypes](https://confluence.ihtsdotools.org/display/WIPTSG/4.5+Get+and+Test+Concept+Subtypes+and+Supertypes)
* [4.8 Find Concepts](https://confluence.ihtsdotools.org/display/WIPTSG/4.8+Find+Concepts)
* [4.13 Get Concept Model Rules](https://confluence.ihtsdotools.org/display/WIPTSG/4.13+Get+Concept+Model+Rules)

### Service Examples

#### Snowstorm API

Validate concept definition:

```http
POST [snowstorm]/browser/{branch}/validate/concept
```

Response: JSON object with concept, descriptions, axioms, relationships.

Validate concept definitions (multiple):

```http
POST [snowstorm]/browser/{branch}/validate/concepts
```

#### FHIR API

No direct SNOMED CT expression validation services.

#### MySQL Example Database

* No direct support for expression validation, but can validate using concept model rules and expression constraints.

### Notes

* Language/dialect should be specified if service returns terms.

<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=Validate%20Concept%20Definitions%20and%20Expressions" 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-terminology-services-guide/4-terminology-service-types/validate-concept-definitions-and-expressions.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.
