> 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/creating-local-code-systems/additional-property-definitions.md).

# Additional Property Definitions

Using the **Local Code System Editor**, Local Code Systems can be further configured by defining the properties for its Local Codes. For adding and defining these Additional Properties click on this button ![](https://snowowl.atlassian.net/wiki/download/attachments/1198358541/add-properties-enabled-icon.png?version=1\&modificationDate=1602678662565\&cacheVersion=1\&api=v2) at the right end side of the *Additional Properties* section bar.

<figure><img src="/files/lVfmpoHpn169j0bxZYOC" alt=""><figcaption><p>Local Code System editor with additional property contex menu</p></figcaption></figure>

Local Code properties can be defined by the following attributes (\* are mandatory):

* **Name\***: unique name of the property
* **Type\***: type of the property

| Property types | Description                                                                                |
| -------------- | ------------------------------------------------------------------------------------------ |
| Boolean        | `true`\|`false`                                                                            |
| String         | text type                                                                                  |
| Integer        | integer numbers                                                                            |
| Decimal        | decimal numbers                                                                            |
| Date           | date with time part                                                                        |
| URI            | [Universal Resource Identifier](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier) |

* **Cardinality\***:

| Values | Description           |
| ------ | --------------------- |
| 0..1   | Optional              |
| 1..1   | Mandatory             |
| 0..\*  | Any                   |
| 1..\*  | Minimum one mandatory |

{% hint style="info" %}
The ![](https://snowowl.atlassian.net/wiki/download/attachments/1198358541/03.png?version=4\&modificationDate=1602684390858\&cacheVersion=1\&api=v2) icon warns the user that if the value of cardinality is reduced, properties may be deleted from that terminology. Hovering over the icon reveals the warning message.
{% endhint %}

* **Default value:** Initial value of the property.
* **Description:** String attribute to capture the description of the given property.
* **Validation expression**: JavaScript validation expression to evaluate when value is assigned to the property.
* **Validation message**: Validation message in case invalid property value entered (the validation expression evaluates to a `false`).

{% hint style="info" %}
Hovering over the name or its field of the property definition attributes brings up a tooltip, about the descriptions of the attributes.
{% endhint %}

<figure><img src="/files/onxOhvtyPCicBoN8pJUu" alt=""><figcaption><p>Additional string property with a displayed tooltip information</p></figcaption></figure>

As a concrete example, the following definitions would need to be created for a Local Code System that groups codes related to medicinal products:

* **tradeName**
  * Type: `String`
  * Cardinality: `1..*`
  * Description: `Trade name of the medicinal product.`
  * Validation expression: *`this.value == _this.value.toUpperCase()`*
  * Validation message: `Trade name '%s' needs to be all uppercase.`
* **isVaccine**
  * Type: `Boolean`
  * Cardinality: `1..1`
* **numberOfBlisters**
  * Type: `Integer`
  * Cardinality: `0..1`
  * Default value: `6`
  * Description: `The number of blisters in the product.`
  * Validation expression: `_this.value > 0`
  * Validation message: `Number of blisters '%s' needs to be a positive number.`

{% hint style="info" %}
URI property types do not support validation expressions. In case of trying to enter something in the Validation expression field of a URI-type property, an error message will be present in the editor.
{% endhint %}

{% hint style="info" %}
Certain property names are reserved and cannot be used as names for additional properties. The following property names fall under the reserved category: *Code*, *Term*, *Alternative Terms*, *Is active*, and *Parent Concept Code*. Entering one of the reserved property names will trigger an error message in the editor.
{% endhint %}

<figure><img src="/files/NHi4f5bhFLXf7fAPmojV" alt=""><figcaption><p>Example Local Code System with 3 additional properties</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.b2ihealthcare.com/snow-owl-authoring-platform/local-code-systems/authoring/creating-local-code-systems/additional-property-definitions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
