> 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.9/reference/resources/codesystems/custom-code-systems/authoring.md).

# Authoring

The authoring process of Custom Code Systems can flow on two different levels: [schema](#schema) and [concept](#concept).

## Schema

New property definitions can be added to the Code System on the ***Schema*** tab, after clicking on the <img src="https://848337088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNfVt73uJmV35VTVsq2mk%2Fuploads%2FJYYgRmh4IaexHiDJe2rV%2Fadd_property_icon.svg?alt=media&amp;token=b67f8c06-4ff7-4aa9-8547-15ee75a69b26" alt="" data-size="line"> button in the middle area.

![Add New Property Type](https://848337088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNfVt73uJmV35VTVsq2mk%2Fuploads%2FcKRqc9yd6kpPptgyn68S%2Fcode_system_schema_add_property.gif?alt=media\&token=dc91924c-97cb-4b3b-9ea3-5136fdbe896b)

The following attributes can be specified for a property definition:

| Attribute         | Description                                                                                                               |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **Name**          | Unique name of the property (mandatory)                                                                                   |
| **Type**          | [Type ](/snowray/v2.9/reference/resources/codesystems/custom-code-systems.md#schema)of the property (mandatory)           |
| **Cardinality**   | Defines the [number of elements](/snowray/v2.9/reference/resources/codesystems/custom-code-systems.md#schema) (mandatory) |
| **Default value** | Initial value of the property                                                                                             |
| **Description**   | Captures the purpose of the property                                                                                      |

{% hint style="info" %}
Once you added a property definition you can customize it by clicking in the text fields and entering an attribute value, or selecting one from the drop-down.
{% endhint %}

Changes to the property can be persisted by clicking the <img src="https://848337088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNfVt73uJmV35VTVsq2mk%2Fuploads%2FEJF76YBC32CxNc9GMejR%2Fcommit_change_icon.svg?alt=media&amp;token=0615ffa9-3d0f-42d0-8802-13b9d5c5497d" alt="" data-size="line"> button.

{% hint style="info" %}
Different property types are indicated with different colors.
{% endhint %}

Existing properties can be edited after clicking the <img src="https://848337088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNfVt73uJmV35VTVsq2mk%2Fuploads%2FBxKjrKQLjJC659ChEXpj%2Fedit_icon.svg?alt=media&amp;token=f9740489-fa8f-4c5a-8854-e15389311a7b" alt="" data-size="line">button.&#x20;

## Concept

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

New concepts can be added to the Code System on the ***Content*** tab, after clicking on the ![](https://848337088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNfVt73uJmV35VTVsq2mk%2Fuploads%2Fe9MTWkW0hSBHocDagkZc%2Fadd_concept_button.png?alt=media\&token=9eefa07c-5ef4-430e-acb9-2cac36dcf953)button.

![Create Code System Concept Wizard](https://848337088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNfVt73uJmV35VTVsq2mk%2Fuploads%2FQ5i5n3ubHUM3WjJ6Hizk%2Fcreate_concept_wizard.png?alt=media\&token=a686d988-8991-40b1-9856-e7f1469ed1ee)

{% hint style="info" %}
If you select a concept from the tree, it will be considered the parent concept. You can change this in the creation wizard.
{% endhint %}

| Field      | Description                                                                                                                     |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **Term**   | The name of the new concept (mandatory)                                                                                         |
| **Code**   | The identifier of the new concept. If you leave this field empty, the system will automatically generate an ID for your Concept |
| **Parent** | The concept under which the new concept will be created                                                                         |

After pressing the ![](https://848337088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNfVt73uJmV35VTVsq2mk%2Fuploads%2FXoLp7z5Vr2hv084hmwEc%2Fcreate_button.png?alt=media)button, the new concept will be added to the Code System tree and its editor will automatically open on the right side.

The preferred term of the concept - by default, the one defined during creation -  is indicated with an <img src="https://848337088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNfVt73uJmV35VTVsq2mk%2Fuploads%2FK1MntsoSwxOqi6HGcl6O%2Fpreferred_term_icon.svg?alt=media&amp;token=716deccb-06ad-43b6-b6db-8aa1699448bd" alt="" data-size="line">icon.&#x20;

{% hint style="info" %}
You can specify alternative terms for a concept, and even move the preferred flag to the newly added terms.
{% endhint %}

## Properties

Property types defined in the Code System Schema are automatically displayed in the concept editor. Values can be added to the properties by pressing the <img src="https://848337088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNfVt73uJmV35VTVsq2mk%2Fuploads%2FJYYgRmh4IaexHiDJe2rV%2Fadd_property_icon.svg?alt=media&amp;token=b67f8c06-4ff7-4aa9-8547-15ee75a69b26" alt="" data-size="line"> button.

{% hint style="info" %}
If you specified a default value in the Schema, the property will automatically be populated with it when adding a new value.
{% endhint %}

{% hint style="warning" %}
If you restricted the potential number of values of a property, e.g. to`1..1`, the <img src="https://848337088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNfVt73uJmV35VTVsq2mk%2Fuploads%2FJYYgRmh4IaexHiDJe2rV%2Fadd_property_icon.svg?alt=media&amp;token=b67f8c06-4ff7-4aa9-8547-15ee75a69b26" alt="" data-size="line"> button won't appear and you won't be able to add more values to the given property.
{% endhint %}

## Issues

{% hint style="info" %}
To access issue management related options, press the ![](https://848337088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNfVt73uJmV35VTVsq2mk%2Fuploads%2F47Eju6SR5jR2SCgjTrrF%2Factions_button.png?alt=media\&token=701561e3-1b9c-44d2-a960-99e9d2ad23f0) button.
{% endhint %}

Users can create issues related to specific Code System concepts using the *Raise an issue* context menu option, while existing issues can be viewed by selecting the *Show issues* action.

{% hint style="info" %}
Want to find out more about issues? Visit the [Issue management](/snowray/v2.9/reference/issue-management.md) page for more information.
{% endhint %}
