> For the complete documentation index, see [llms.txt](https://docs.b2ihealthcare.com/snowray/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.b2ihealthcare.com/snowray/v2.1.0/reference/resources/valuesets/authoring.md).

# Authoring

{% hint style="info" %}
To enter editing mode and access functionalities related to authoring, click on the![](https://2151851347-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNmYDYy59u4utCYtlZ8vF%2Fuploads%2F6CTXGEw5I2Z0SulQujcg%2Fedit_button.png?alt=media) button in the upper right corner of the selected Value Set's content page.
{% endhint %}

## Add a New Clause

New clauses can be added by constructing a query expression supported by the domain Code System (in case of SNOMED CT, this is an [ECL](https://confluence.ihtsdotools.org/display/DOCECL) expression), after clicking on the area surrounded by an intermittent line under the Includes and Excludes sections.

![Create a New Clause](https://2151851347-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNmYDYy59u4utCYtlZ8vF%2Fuploads%2Fyihchg2WiF24WNgX2eka%2Fvalue_set_includes.gif?alt=media)

{% hint style="info" %}
While authoring, clauses highlight parts of the hierarchy with colors. These help identify which part of the hierarchy is included (green and/or normal gray), excluded (red), suggested (purple), or just displayed (light gray) for contextual information.

If selecting a concept from the terminology tree the clause that involves the concept will be highlighted.
{% endhint %}

![Highlight Clauses](https://2151851347-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNmYDYy59u4utCYtlZ8vF%2Fuploads%2F7MgvovZjekLBBn8dhyft%2Fvalue_set_highlight_clauses.gif?alt=media\&token=27a65b06-02ce-4d58-9733-14b4445e7b42)

There are different ways to add clauses to a Value Set. For more information visit the following pages:

{% content-ref url="/pages/-MgLfhQklrGXDUBU-004" %}
[Drag and Drop](/snowray/v2.1.0/reference/resources/valuesets/authoring/dnd.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MgLcrL7T31wDCvCbEiN" %}
[Basic Clause Editor](/snowray/v2.1.0/reference/resources/valuesets/authoring/editor.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MgLd0nRrl6iBdiA5LTA" %}
[Copy-Paste](/snowray/v2.1.0/reference/resources/valuesets/authoring/copypaste.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MgLdC16HOL6LocZ896N" %}
[Advanced Clause Editor](/snowray/v2.1.0/reference/resources/valuesets/authoring/advancededitor.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MiVgFdm5songIp0ykd\_" %}
[Import Simple Type Reference Set](/snowray/v2.1.0/reference/resources/valuesets/authoring/import.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MgPbr4gZLf9I\_cfxi2a" %}
[Broken mention](broken://pages/-MgPbr4gZLf9I_cfxi2a)
{% endcontent-ref %}

## Edit Clause

Hovering over an existing clause reveals the![](https://2151851347-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNmYDYy59u4utCYtlZ8vF%2Fuploads%2FpeLITbv2ZjB2FcUuYjxB%2Fedit_icon.png?alt=media)icon, which enables editing the selected clause. Changes can be persisted by clicking on the green checkmark.

![Edit a Value Set Clause](https://2151851347-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNmYDYy59u4utCYtlZ8vF%2Fuploads%2FD4KfUXNI53rdUdavwIWn%2Fvalue_set_edit_clause.gif?alt=media)

## Optimize (coming soon)

As part of the authoring process, users also have the option to optimize their Value Sets. This feature simplifies Value Sets by replacing members with [ECL ](https://confluence.ihtsdotools.org/display/DOCECL)expressions. For example, if all the children of a [concept](/snowray/v2.1.0/reference/resources/codesystems.md#concepts) are added, it will reduce the clauses to a single clause using the following format: `< parentId | FSN |`.

{% hint style="info" %}
To use this option, navigate to the specific Value Set and [start editing](/snowray/v2.1.0/reference/resources/valuesets.md#authoring). In the upper right corner on the authoring page press the![](https://2151851347-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNmYDYy59u4utCYtlZ8vF%2Fuploads%2FvAlZZxAObE5iANGS6g6z%2Foptimize_button.png?alt=media)button.
{% endhint %}
