# Customize a shared valueset

## Overview

[Video: Customize a shared valueset](https://www.youtube.com/watch?v=cjUHOqRG4PE)

This flow describes how to customize a shared [valueset](https://docs.ohc.network/concepts/definitions/valueset.md) for your facility. A facility customization takes the slug of the shared valueset. In your facility, it then takes the place of the shared valueset in the fields that find their valueset by that slug. The shared valueset stays unchanged.

Note: A new facility valueset stays hidden from everyone in the facility, including you, until it is shared with a department. After that, members of the departments that it is shared with can see and use it. Members of their parent departments can too. These members need the Can Read ValueSets permission. A role in the facility's root organization does not show it to you. This is true even with Can Create/Update ValueSets, unless the valueset is shared with the root organization (**Administration**).

## Pre-requisites

* You are a member of a department of the facility.
* Your facility has no other valueset with the slug of the shared valueset, such as an earlier customization of it.
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Can Create/Update ValueSets | Lets you see **Customize** and save the facility customization. You must hold it in the root organization. By default, the Facility Admin role holds this permission. |

You need no other permission to open the **ValueSets** page, see the **Shared catalogue**, or preview a valueset.

## Steps

### 1. Open the Shared catalogue

In the facility sidebar, select **Settings**.

In the settings sidebar, under **Forms**, select **ValueSets**.

Select the **Shared catalogue** tab.

Care lists the shared valuesets that are Active. To see other statuses, change **Status**.

To find a valueset by name, type in **Search ValueSets**.

To see the codes of a shared valueset before you customize it, select **Preview** on its row.

![Step 1, Open the Shared catalogue (1 of 3): the screen at this step, with the control for the step outlined](/assets/images/customize-shared-valueset-1-599060d05a714779dc74908ffdb089e6.webp)

![Step 1, Open the Shared catalogue (2 of 3): the screen at this step, with the control for the step outlined](/assets/images/customize-shared-valueset-2-4feafb711b43addce788294b9df6d775.webp)

![Step 1, Open the Shared catalogue (3 of 3): the screen at this step, with the control for the step outlined](/assets/images/customize-shared-valueset-3-f60d49bb10af6e13739faadc411083e9.webp)

### 2. Start the customization

On the row of the shared valueset, select **Customize**.

Care opens the **Create ValueSet** page.

The shared valueset is already selected in **Parent value set**, and **Facility customization** is selected.

You can also start from **Create ValueSet** on the **This facility** tab. Select a shared valueset in **Parent value set**, then select **Facility customization**.

**Facility customization** is available only when the parent is a shared valueset.

Care shows a note under the choice. The customization applies to fields that find their valueset by this slug, not to fields that are pinned to one valueset. A user's own saved choice can come first.

![Step 2, Start the customization (1 of 2): the screen at this step, with the control for the step outlined](/assets/images/customize-shared-valueset-4-4d49d4f2e0f275d018afa13af600de05.webp)

![Step 2, Start the customization (2 of 2): the screen at this step, with the control for the step outlined](/assets/images/customize-shared-valueset-5-93716fdee07b9021e58378d172982937.webp)

### 3. Enter the basic information

Under **Basic Information**, complete the fields.

| Components | What it captures |
| - | - |
| Name | The name of the customization. This field is required. Care does not copy the name of the shared valueset. |
| Slug | The slug of the shared valueset. Care shows **Taken from the parent value set**, and you cannot change it. |
| Status | The stage of the customization. This field is required. Care selects **Active**. |
| Description | Text that explains the purpose of the customization. This field is optional. |

Only an Active customization takes the place of the shared valueset. If you select **Draft**, fields keep the shared valueset.

![Step 3, Enter the basic information: the screen at this step, with the control for the step outlined](/assets/images/customize-shared-valueset-6-c11fb32bc6d25d069a2eb61a3923c938.webp)

### 4. Change the rules

Under **Definition**, **Use parent rules** is on. The customization uses the rules of the shared valueset together with the rules that you add.

To add codes, add include rules.

To remove codes, add exclude rules. Exclude rules remove matching codes from the included codes.

To replace the rules of the shared valueset, turn off **Use parent rules**. The customization then uses only the rules that you add.

For the full procedure, see [Build include and exclude rules](https://docs.ohc.network/flows/definitions/valueset/build-include-and-exclude-rules.md).

![Step 4, Change the rules: the screen at this step, with the control for the step outlined](/assets/images/customize-shared-valueset-7-091d47cc2902bfacfc67ecc0c213901b.webp)

### 5. Preview the codes

This step is optional.

Select **Preview** to see the codes that match the rules.

If **Use parent rules** is on, the preview shows only the rules that you added here, not the rules of the shared valueset.

For the full procedure, see [Preview a valueset](https://docs.ohc.network/flows/definitions/valueset/preview-valueset.md).

![Step 5, Preview the codes: the screen at this step, with the control for the step outlined](/assets/images/customize-shared-valueset-8-5909538572dea12b0339baa661a8879c.webp)

### 6. Save the customization

Select **Save**.

**Save** is available only after you change a field.

If a field needs a correction, Care lists it under **Review these fields before saving**.

To leave without saving, select the back arrow next to the page title. If you have unsaved changes, Care asks you to confirm.

![Step 6, Save the customization: the screen at this step, with the control for the step outlined](/assets/images/customize-shared-valueset-9-475af24297af73abd2243b675ad06343.webp)

## Expected Outcome

* Care saves the customization for your facility with the slug of the shared valueset.
* The shared valueset stays unchanged in the **Shared catalogue**.
* Care shows **ValueSet created successfully** and then **Not Found**.
* Care then shows an empty **Create ValueSet** form, with **No changes to save** and **Save** not available. The form shows no parent and **Separate value set**.
* The **Not Found** message and the empty form appear because the new customization is hidden. It stays hidden until it is shared with a department. Your customization is saved.
* The customization does not appear on the **This facility** tab until it is shared with a department.
* After it is shared, members of those departments get the customization in fields that find their valueset by this slug. Members of their parent departments get it too.
* These members need Can Read ValueSets. Other users keep the shared valueset.
* A user who chose a valueset with **Change** in a coded field keeps that choice.

## Related

Concepts:

* [Valueset](https://docs.ohc.network/concepts/definitions/valueset.md)

Flows:

* [Share a valueset with departments](https://docs.ohc.network/flows/definitions/valueset/share-valueset-with-departments.md)
* [Create a valueset](https://docs.ohc.network/flows/definitions/valueset/create-valueset.md)
* [Build include and exclude rules](https://docs.ohc.network/flows/definitions/valueset/build-include-and-exclude-rules.md)
* [Preview a valueset](https://docs.ohc.network/flows/definitions/valueset/preview-valueset.md)
* [Update or retire a valueset](https://docs.ohc.network/flows/definitions/valueset/update-or-retire-valueset.md)
