# Share a valueset with departments

## Overview

[Video: Share a valueset with departments](https://www.youtube.com/watch?v=jkxH8VUR_Hk)

This flow describes how to choose the departments that can see and use a facility [valueset](https://docs.ohc.network/concepts/definitions/valueset.md). Care shows a facility valueset only to members of the departments that it is shared with, and of their parent departments.

## Pre-requisites

* The valueset is on the **This facility** tab of the **ValueSets** page.
* The valueset is already shared with your department, or with one of its sub-departments.
* You have the permissions listed below.

Note: A new facility valueset stays hidden, even from the person who created it, until it is shared with a department. Until then, a role in the facility's root organization (**Administration**) does not show it either. Use this flow only for a valueset that you can open.

## Permissions

| Permission | Access |
| - | - |
| Can Create/Update ValueSets | Lets you see and change the departments of the valueset. You must hold it in the root organization. Without it there, the page does not show **Departments with access**. By default, the Facility Admin role holds it. |
| Can Read ValueSets | Lets you find the valueset in the list and open it. You must hold it in a department that the valueset is shared with, or in a parent department of one. Holding it in the root organization alone is not enough, unless the valueset is shared with the root organization (**Administration**). By default, the Facility Admin, Administrator, Doctor, Nurse, Staff, Pharmacist and Volunteer roles hold it. |
| Can View Facility Organizations | Lets you see the departments in the **Select Department** list. If you hold it in the root organization, the list shows every department, including the root organization. If you hold it only in a department, the list leaves out the root organization. By default, the Facility Admin, Administrator, Doctor, Nurse, Staff and Volunteer roles hold it. |

## Steps

### 1. Open the valueset list

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

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

Care opens the **ValueSets** page on the **This facility** tab.

![Step 1, Open the valueset list (1 of 2): the screen at this step, with the control for the step outlined](/assets/images/share-valueset-with-departments-1-599060d05a714779dc74908ffdb089e6.webp)

![Step 1, Open the valueset list (2 of 2): the screen at this step, with the control for the step outlined](/assets/images/share-valueset-with-departments-2-4feafb711b43addce788294b9df6d775.webp)

### 2. Open the valueset

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

The list shows **Active** valuesets. To find a valueset with another status, change **Status**.

On the row of the valueset, select **Edit**.

Care opens the **Edit ValueSet** page.

![Step 2, Open the valueset: the screen at this step, with the control for the step outlined](/assets/images/share-valueset-with-departments-3-8058046286e837ecc42f7a2888d0b149.webp)

### 3. Find the departments

Find **Departments with access**, below **Basic Information** and above **Definition**.

The field shows the departments that the valueset is shared with, below the **Select Department** button.

![Step 3, Find the departments: the screen at this step, with the control for the step outlined](/assets/images/share-valueset-with-departments-4-2fb67866ee3f7677225c25f3b1791534.webp)

### 4. Add a department

Select **Select Department**. Care opens the list of departments.

To find a department by name, type in the search box at the top of the list.

To see the sub-departments of a department, select its expand button.

Select the check box of the department.

Care saves the change at once and shows **Organizations updated**.

Do the same for each department that you want to add.

Select **Done** to close the list. If no department is selected, the button is **Close**.

![Step 4, Add a department: the screen at this step, with the control for the step outlined](/assets/images/share-valueset-with-departments-5-cb6f4202c463b0f2e5e59904332639fe.webp)

### 5. Remove a department

Below **Select Department**, find the department that you want to remove.

Select the remove button next to its name.

Care saves the change at once and shows **Organizations updated**.

You can also clear the check box of the department in the list.

In the list, **Clear all** removes every department at once.

Caution: If you remove the departments that give you access, Care hides the valueset from you.

Note: You do not need to select **Save** for department changes. Care saves each change as you make it.

![Step 5, Remove a department (1 of 2): the screen at this step, with the control for the step outlined](/assets/images/share-valueset-with-departments-6-bbc55aa70224df54c997b393d034998b.webp)

![Step 5, Remove a department (2 of 2): the screen at this step, with the control for the step outlined](/assets/images/share-valueset-with-departments-7-d6bfd683e9ab04ad1b5b63711c4d5bed.webp)

## Expected Outcome

* **Departments with access** shows the departments that you selected.
* Members of those departments can find and open the valueset, if they hold Can Read ValueSets.
* Members of the parent departments of those departments can also see it, with the same permission.
* Members of a removed department lose access, unless another shared department gives them access.
* Other facility members cannot see the valueset. A role in the root organization alone is not enough, unless the valueset is shared with the root organization (**Administration**).

## Related

Concepts:

* [Valueset](https://docs.ohc.network/concepts/definitions/valueset.md)
* [Department](https://docs.ohc.network/concepts/facility/department.md)
* [Facility Organization](https://docs.ohc.network/concepts/access-governance/facility-organization.md)

Flows:

* [Create a valueset](https://docs.ohc.network/flows/definitions/valueset/create-valueset.md)
* [Customize a shared valueset](https://docs.ohc.network/flows/definitions/valueset/customize-shared-valueset.md)
* [Update or retire a valueset](https://docs.ohc.network/flows/definitions/valueset/update-or-retire-valueset.md)
* [Add users to a department](https://docs.ohc.network/flows/facility/department/add-users-to-department.md)
