# Set a device's managing department

## Overview

[Video: Set a device's managing department](https://www.youtube.com/watch?v=qD4tkF3W_9Y)

This flow describes how to set, change or remove the managing department of a [device](https://docs.ohc.network/concepts/facility/device.md). A device has at most one managing [department](https://docs.ohc.network/concepts/facility/department.md).

The managing department decides which department members can see and manage the device. The departments of a device are the Administration department of the facility, the managing department and each parent department of the managing department.

Members of the Administration department see every device of the facility. Members of another department see the devices that their department or one of its sub-departments manages.

To link the device to a location, see [Link a device to a location](https://docs.ohc.network/flows/facility/device/link-device-to-location.md).

## Pre-requisites

* The device is registered in the facility. To see the device, you hold a role in a department of the device.
* The department is a department of the same facility.
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Can Manage Devices on Facility | Set, change or remove the managing department of the device. You must hold it in a department of the device. By default, the Facility Admin, Staff and Pharmacist roles hold this permission. |
| Can Manage Facility Organizations | Set, change or remove the managing department of the device. To set or change it, you must hold it in the selected department or in a parent of it. To remove it, you must hold it in the current managing department or in a parent of it. A role in the Administration department of the facility also counts. By default, the Facility Admin and Administrator roles hold this permission. |
| Can View Facility Organizations | See departments in the department picker. If you hold it in the Administration department, the picker lists every department, including Administration. If you hold it only in another department, the picker lists every department except Administration. By default, the Facility Admin, Administrator, Staff, Doctor, Nurse and Volunteer roles hold this permission. |

Note: By default, only the Facility Admin role holds both permissions that you need to save the change. The Staff and Pharmacist roles do not hold "Can Manage Facility Organizations". The Administrator role does not hold "Can Manage Devices on Facility".

Note: Care shows **Associate** and **Change** on the **Managing Organization** row to every user who can open the device page. Only users with the permissions above can save the change.

## Steps

### 1. Open the device

1. In the facility sidebar, select **Settings**.
2. Under **Facility**, select **Devices**.
3. Select the card of the device. Care opens the device page.

![The device page of Glucometer GL-11, with its name, the user friendly name Ward Glucometer 11 and its status badges outlined](/assets/images/set-device-managing-department-1-7ecddc891241a832aa381e8b98254ef9.webp)

### 2. Open the Manage Organization sheet

On the device page, find the **Managing Organization** row.

* If the device has no managing department, the row shows **No organization associated**. Select **Associate**.
* If the device has a managing department, the row shows its name. Select **Change**.

Care opens the **Manage Organization** sheet.

![The Managing Organization row of the Device Information card outlined, showing No organization associated and the Associate button](/assets/images/set-device-managing-department-2-11c52e9dced463ccfd4244c2d294d3de.webp)

### 3. Set or change the managing department

1. Open **Select Department**.
2. Select one department.
3. Select **Add Organization**.

Care shows **Organization added successfully** and closes the sheet.

If the device already has a managing department, the department that you select replaces it.

Note: You can select only one department. The picker shows the current managing department as linked, and you cannot select it again.

Note: **Add Organization** stays disabled until a department is selected.

Note: Care can select a department for you when the picker opens. It selects your preferred departments, or your only department if you belong to one. Check the selection before you select **Add Organization**.

![The Manage Organization sheet with the department picker open, General searched for, and the department General Medicine outlined](/assets/images/set-device-managing-department-3-f80049306ddfdf766940a9cf60aab004.webp)

![The Manage Organization sheet with General Medicine selected below Select Department, No organization added yet under Current Organization, and the Add Organization button outlined](/assets/images/set-device-managing-department-4-7ed146832edd0dffcab6701019762016.webp)

![The device page after saving, with the message Organization added successfully and the Managing Organization row outlined, showing General Medicine and the Change button](/assets/images/set-device-managing-department-5-39a460678afb3c37d085890fdca82622.webp)

### 4. Remove the managing department

1. On the **Managing Organization** row, select **Change**.
2. Under **Current Organization**, find the current managing department.
3. Select the trash icon next to it.

Care shows **Organization removed successfully**.

If the device has no managing department, the sheet shows **No organization added yet** under **Current Organization**.

Note: If you do not hold a permission from the table, Care refuses the removal and shows the reason. For example, Care shows "You do not have permission to update device". The department stays in the sheet.

![The sheet after the removal, with the message Organization removed successfully and Current Organization outlined, showing No organization added yet](/assets/images/set-device-managing-department-7-1cf887429b4caeee8898ab52cebaaf64.webp)

## Expected Outcome

* The **Managing Organization** row of the device page shows the name of the department as a link.
* Members of the new managing department and of its parent departments get access to the device. Members of the Administration department of the facility keep access.
* If you change or remove the managing department, members of the old department lose access to the device. This does not apply when the old department is a parent of the new one.
* If you remove the managing department, the row shows **No organization associated**. Only members of the Administration department can then see the device.

## Related

Concepts:

* [Device](https://docs.ohc.network/concepts/facility/device.md)
* [Department](https://docs.ohc.network/concepts/facility/department.md)

Flows:

* [View devices](https://docs.ohc.network/flows/facility/device/view-devices.md)
* [Link a device to a location](https://docs.ohc.network/flows/facility/device/link-device-to-location.md)
* [Create a department](https://docs.ohc.network/flows/facility/department/create-department.md)
* [Add users to a department](https://docs.ohc.network/flows/facility/department/add-users-to-department.md)
