# Reorder locations

## Overview

This flow describes how to change the order of the [locations](https://docs.ohc.network/concepts/facility/location.md) and beds on the **Locations** page in Care. Each move swaps a location with the one next to it in its list.

Care loads all the sub-locations and beds of a location, with no pages, so you can reorder all of them. Care lists locations in the order that you set.

[Video: Reorder locations](https://www.youtube.com/watch?v=VWk_xs33ABA)

## Pre-requisites

* You can open the facility in Care. You hold a role in the facility, or you belong to a government organization that covers the facility.
* The list has at least two locations, or at least two beds.
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Can Create/Update Facility Locations | Lets you move a location. Each move saves both locations that change places, so you need it on both locations. By default, the Facility Admin and Staff roles hold it. |
| Can List Facility Locations | Lets you find and open the locations. You need it on the locations. Without it, Care cannot find a location, even if you hold the other permission. By default, the Doctor, Nurse, Staff, Pharmacist, Administrator and Facility Admin roles hold it. |

You hold a permission on a location when a role in one of these places gives it to you:

* A department linked to the location, or to a location that holds the location.
* A parent department of such a department.
* The facility's root department, Administration. A role there reaches every location of the facility.

By default, if you hold the Facility Admin or Staff role in one of these places, you have both permissions.

## Steps

### 1. Open the Locations page

Open the facility.

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

In the settings sidebar, under **Facility**, select **Locations**.

Care shows the **Locations** page. With no location open, the page lists the top-level locations of the facility.

![The Locations page with the list of top-level locations of the facility.](/assets/images/reorder-locations-1-259e4929e90d705c464a98cb15d0fa0f.webp)

### 2. Open the list that you want to reorder

To reorder the top-level locations, keep no location open.

To reorder the locations or beds inside a location, open that location. Select it in the location tree, or select its row in the list.

Note: On a phone-width screen, the location tree is hidden. Use the list.

The opened location shows its sub-locations under **Sub-locations** and its beds under **Beds**.

![The page of Ward 3, with Room 301, Room 302, Room 303 and Room 304 in that order under Sub-locations.](/assets/images/reorder-locations-2-670040e68d6a2a7244ff8cf9c53b04e4.webp)

### 3. Clear the search

If the **Search by name** box has text, clear it.

Care does not offer **Move Up**, **Move Down**, **Move Earlier** or **Move Later** while the box has text.

### 4. Move the location

1. On the row of the location, or on the tile of the bed, select the "⋮" menu.
2. To move a location up one place, select **Move Up**. To move it down one place, select **Move Down**. For a bed, the menu has **Move Earlier** and **Move Later** instead.

![The menu on the row of Room 302 open, with Move Up and Move Down.](/assets/images/reorder-locations-4-929da4baac704ca27790a16ab217c61b.webp)

Care saves the new order and shows **Location order updated successfully**.

![The message Location order updated successfully, with Room 302 now above Room 301 in the list and in the location tree.](/assets/images/reorder-locations-5-8c142526a7e296cf4bbf82ffe2b484a6.webp)

Repeat until the location is in the place that you want.

The first item in the list has no **Move Up** or **Move Earlier**, and the last item has no **Move Down** or **Move Later**.

A sub-location changes places only with another sub-location, and a bed only with another bed.

Note: Reordering does not move a location into another location. The location that holds a location cannot be changed.

## Expected Outcome

* The location shows in its new place in the list.
* Care saves the order, so the location stays in its new place when you open the list again.

## Related

Concepts:

* [Locations](https://docs.ohc.network/concepts/facility/location.md)

Flows:

* [View locations](https://docs.ohc.network/flows/facility/location/view-locations.md)
* [Create a location](https://docs.ohc.network/flows/facility/location/create-location.md)
* [Add beds to a location](https://docs.ohc.network/flows/facility/location/add-beds.md)
