> For the complete documentation index, see [llms.txt](https://docs.b2ihealthcare.com/snow-owl-authoring-platform/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/snow-owl-authoring-platform/local-code-systems/authoring/adding-local-codes.md). Agents can also search and read this documentation through its [MCP server](https://docs.b2ihealthcare.com/snow-owl-authoring-platform/~gitbook/mcp).

# Adding Local Codes

To add a code to your Local Code System, right-click on the desired Local Code System's name to reveal the **Context Menu**, and select  **`New child code...`** action.

![Adding a new Local Code](https://snowowl.atlassian.net/wiki/download/thumbnails/1199079575/image2020-12-15_13-36-58.png?version=1\&modificationDate=1608035819717\&cacheVersion=1\&api=v2\&width=272)

<figure><img src="https://content.gitbook.com/content/N7ynFOLTw3W9Zow9AaAJ/blobs/FGQsik7BW8IMtRKRL4zk/image.png" alt=""><figcaption><p>Creating new Local Code System Code</p></figcaption></figure>

Enter the code ID and the code term.&#x20;

{% hint style="info" %}
The code ID is optional, the system will generate a quasi-sequential integer ID if the ID field is omitted.&#x20;
{% endhint %}

{% hint style="success" %}
After finishing the wizard the new code is displayed in the **Local Code System View** and its editor opens automatically.&#x20;
{% endhint %}

If you want to specify other terms, click on the **`Add new description`** ![](https://snowowl.atlassian.net/wiki/download/attachments/611026132/descr-icon-02.png?version=1\&modificationDate=1578402206718\&cacheVersion=1\&api=v2) button and enter the information.&#x20;

{% hint style="info" %}
If the entry field is not visible, click on the triangle next to Descriptions to expand the section for descriptions.&#x20;
{% endhint %}

To delete an alternative term or if you unintentionally added an entry field click on the ![](https://content.gitbook.com/content/N7ynFOLTw3W9Zow9AaAJ/blobs/1IYa7gEIrOghVarQo008/image.png) button next to the entry field.

The user-defined additional properties are listed under the *Additional Properties* section. Mandatory properties are added by default, optional properties can be added by pressing the **`+`** button on the header. The **`+`** button reveals a **Context Menu** with all the properties defined for the Local Code System with the applicable properties enabled. Properties can be removed by pressing the ![](https://content.gitbook.com/content/N7ynFOLTw3W9Zow9AaAJ/blobs/GAOnVPVyImh02FXhByJT/image.png) button next to the property.  Property values are validated against the validation expression configured for the corresponding definition set on the Local Code System.

<figure><img src="https://content.gitbook.com/content/N7ynFOLTw3W9Zow9AaAJ/blobs/ku8T3T8MeglwKAlNuTYD/image.png" alt=""><figcaption><p>Mandatory properties validation</p></figcaption></figure>

{% hint style="info" %}
To add a code of the same hierarchy level as your new code, right-click the root. To add a code of a lower hierarchy level, right-click on the parent and select the **`New child code...`** action from the **Context Menu***.*
{% endhint %}

Double-click the code in the **Local Code System View** to open its editor. Modify the information by overwriting the text fields, or adding or deleting additional terms, properties.
