# Manage the users assigned to a patient

## Overview

This flow describes how to assign a user to a [patient](https://docs.ohc.network/concepts/clinical/patient.md) on the patient's **Users** tab, and how to remove an assigned user. Assigning a user gives that user access to this patient, with the role that you choose.

[Video: Manage the users assigned to a patient](https://www.youtube.com/watch?v=wfLq-qQFIrk)

## Pre-requisites

* The patient is registered in Care.
* You can open the patient's profile. See [View a patient's profile](https://docs.ohc.network/flows/clinical/patient/view-patient-profile.md).
* The user that you want to assign has an account in Care.
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Can Update a Patient's data | Assign and remove users. Care shows **Assign User** and the trash button on each card only if you hold it. You need it through a [role on the patient](https://docs.ohc.network/concepts/clinical/patient.md). By default, the Staff, Doctor, Nurse, Administrator and Facility Admin roles hold it. |
| Can view clinical data about patients | Open the patient's profile and its **Users** tab, and again when you assign or remove a user. You need it through a role on the patient. By default, the Staff, Doctor, Nurse and Facility Admin roles hold it. |
| Can list patients | Open the patient, in place of Can view clinical data about patients. You need it in a government organization that covers the patient. If you are assigned to the patient yourself, you need neither of these two permissions to open the patient. By default, the Staff, Doctor, Nurse, Volunteer and Administrator roles hold it. The Pharmacist and Facility Admin roles hold it too, but Care does not offer them for a government organization. |
| Can Read Tag Config | Open the profile inside a facility. Hold it in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count. By default, the Staff, Doctor, Nurse, Pharmacist, Volunteer, Administrator and Facility Admin roles hold it. |

Any signed-in user can search for a user and see the list of roles.

By default, a Staff, Doctor, Nurse or Facility Admin role gives every permission above.

The role can be in a department of the patient's open encounter, or in one above it. A department of the encounter's current location also counts. So does the facility's Administration department, while the patient has an open encounter at the facility.

## Steps

### 1. Open the Users tab

Open the patient's profile. See [View a patient's profile](https://docs.ohc.network/flows/clinical/patient/view-patient-profile.md).

Select the **Users** tab.

The tab lists the users assigned to the patient. Each card shows the user's name, username and **Phone Number**.

The card does not show the role that the user has on this patient.

If no user is assigned, the tab shows "No User Assigned to this patient".

![The Users tab of the profile, with No User Assigned to this patient outlined below the Assign User button](/assets/images/manage-patient-users-1-a5c5849b35e948e6ef1f7caea48eb08b.webp)

### 2. Open the Assign User panel

Select **Assign User**.

Care opens the **Assign User to Patient** panel. The panel says "Search for a user and assign a role to add them to the patient."

![The Assign User to Patient panel outlined, with the Search User box and the Assign to Patient button](/assets/images/manage-patient-users-2-e013031f40357873d8441d871243ac29.webp)

### 3. Select the user

In **Search User**, type the first name, the last name or the username of the user.

The search covers all users in Care, not only the users of this facility.

Select the user in the results. If no user matches, Care shows "No Users Found".

The panel shows the name, **Username** and **Phone Number** of the user.

You cannot assign a user who is already assigned to this patient.

![The details of the selected user outlined in the panel: name, Username and Phone Number](/assets/images/manage-patient-users-3-b7516303f47829b4e30d2079839b1660.webp)

### 4. Select the role

In **Select Role**, select the role that the user gets on this patient.

The list offers the roles that are meant for facilities.

The user gets the permissions of this role for this patient only.

![The Select Role dropdown outlined, set to Staff](/assets/images/manage-patient-users-4-93b24a62f63d8ca23f01c04ff9b8b5d6.webp)

### 5. Assign the user

Select **Assign to Patient**.

**Assign to Patient** stays disabled until you select a user and a role.

Care shows "User added to patient successfully" and closes the panel.

![The Users tab with the card of the assigned user outlined and the message User added to patient successfully](/assets/images/manage-patient-users-5-911bc2fa1c167db0d7792383d516e35c.webp)

### 6. Remove an assigned user

Do this step only when you want to remove a user from the patient.

On the card of the user, select the trash button.

Care opens the **Remove User** dialog. The dialog names the user whose card you selected. Check the name before you continue.

Select **Remove**.

Care shows "User removed successfully".

![The Remove User dialog outlined, naming the user, with the Cancel and Remove buttons](/assets/images/manage-patient-users-6-f3859860277d7d84302e7b6104d76ec2.webp)

## Expected Outcome

* The **Users** tab lists the user that you assigned.
* The assigned user has access to this patient. Their role on this patient is the role that you selected.
* When you remove a user, the **Users** tab no longer lists that user.
* A removed user can still have a role on the patient in other ways. One example is a role in a department of the patient's open encounter.

## Related

Concepts:

* [Patient](https://docs.ohc.network/concepts/clinical/patient.md)
* [User](https://docs.ohc.network/concepts/access-governance/user.md)
* [Roles and Permission](https://docs.ohc.network/concepts/access-governance/access-control.md)

Flows:

* [View a patient's profile](https://docs.ohc.network/flows/clinical/patient/view-patient-profile.md)
* [Update a patient's details](https://docs.ohc.network/flows/clinical/patient/update-patient-details.md)
