# Expressions With Attribute Groups

Where a SNOMED CT concept definition comprises a number of qualifying attributes, it may be necessary to group these to avoid ambiguity as to how they apply. An example of a SNOMED CT concept whose definition comprises multiple attribute groups is: [116028008 | Salpingo-oophorectomy|](http://snomed.info/id/116028008) This procedure comprises two sub-procedures: the excision of part or all of the ovarian structure and the excision of part or all of the fallopian tube structure. This is demonstrated by the SNOMED CT expression for salpingo-oophorectomy, as shown below:

```
71388002 |Procedure|:
{ 260686004 |Method|= 129304002 |Excision - action|,
405813007 |Procedure site - direct| = 15497006 |Ovarian structure|},
{ 260686004 |Method|= 129304002 |Excision - action|,
405813007 |Procedure site - direct|= 31435000 |Fallopian tube structure|}
```

Where it is necessary to unambiguously qualify individual attributes of a concept whose definition comprises a number of attribute groups, a postcoordinated expression with grouping may be used. The following example describes a salpingo-oophorectomy, with laser excision of the right ovary and diathermy excision of the left fallopian tube. Note that without the grouping, it would not be possible to tell on which structure the laser excision was used and on which structure the diathermy excision was used.

```
71388002 |procedure|:
{ 260686004 |method| = 129304002 |excision - action|,
405813007 |procedure site - direct| = 20837000 |structure of right ovary|,
424226004 |using device| = 122456005 |laser device|},
{ 260686004 |method| = 261519002 |diathermy excision - action|,
405813007 |procedure site - direct| = 113293009 |structure of left fallopian tube|}
```

A number of grouped qualifiers may thus be used to refine a concept. Note that the comma between adjacent groups is optional (and omitted in this example), while the comma between adjacent attributes is mandatory. Also note, the syntax does not limit the maximum number of attributes in a group or the maximum number of groups within an expression.

It is also worth noting that when all attributes in a refinement belong to the same attribute group the braces around the attribute group are optional. Therefore the following two expressions are considered to be equivalent:

```
71388002 |Procedure|:
260686004 |Method| = 129304002 |Excision - action|,
405813007 |Procedure site - direct| = 15497006 |Ovarian structure|
```

```
71388002 |Procedure|:
{260686004 |Method| = 129304002 |Excision - action|,
405813007 |Procedure site - direct| = 15497006 |Ovarian structure|}
```

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=Compositional-Grammar-Specification&#x26;entry.670899847=Expressions%20With%20Attribute%20Groups" 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-specifications/snomed-ct-compositional-grammar-specification/examples/6.4-expressions-with-attribute-groups.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.
