# Logical Model

A SNOMED CT Compositional Grammar expression begins with an optional definition status, contains one or more focus concepts (represented by a concept identifier) and optionally has a refinement. Each refinement may contain grouped or ungrouped attributes (or both). An attribute[^1] consists of the attribute name (represented by a concept identifier) together with the value of the attribute. The attribute value is either an expression or a concrete value (i.e. string, integer, decimal or boolean). Figure 2 below illustrates the overall structure of a compositional grammar expression using an abstract representation. Please note that no specific semantics should be attributed to each arrow in this abstract diagram.

<figure><img src="https://4141246834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVgpC90r7t9DyATri97GG%2Fuploads%2Fgit-blob-a9c6a5d77871104cd08792b362d9ac8bea97bb2f%2F29951551.png?alt=media" alt=""><figcaption><p><strong>Figure 2: Abstract model of a compositional grammar expression</strong></p></figcaption></figure>

Figure 3 below shows an example of an expression with the main components marked. These components will be explained further in the subsequent sections of this document.

<figure><img src="https://4141246834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVgpC90r7t9DyATri97GG%2Fuploads%2Fgit-blob-c449ca9f65ea4bbf8bef42063e17d1271ffc8dd1%2F162727196.png?alt=media" alt=""><figcaption><p><strong>Figure 3: The main parts of an example expression</strong></p></figcaption></figure>

## Details

Figure 4 below provides a more formal representation of the logical model of SNOMED CT Compositional Grammar using a UML class diagram.

<figure><img src="https://4141246834-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVgpC90r7t9DyATri97GG%2Fuploads%2Fgit-blob-9e88fa97c4d686d5bdcaff2c7660a9bc9dea582d%2F110335948.png?alt=media" alt=""><figcaption><p><strong>Figure 4: Logical Model of SNOMED CT Compositional Grammar</strong></p></figcaption></figure>

...

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=Compositional-Grammar-Specification&#x26;entry.670899847=Logical%20Model" class="button primary">Provide Feedback</a>

[^1]: Please note that, in the context of an expression, the word 'Attribute' is used to refer to the name/value pair within a refinement. However, in the context of the SNOMED CT concept model, the word 'Attribute' is often used to refer specifically to the 'attribute name' (i.e. the concept used as the relationship type).
