# Update or retire an activity definition

## Overview

[Video: Update or retire an activity definition](https://www.youtube.com/watch?v=tYPjcrRaTgQ)

This flow describes how to change an [activity definition](https://docs.ohc.network/concepts/definitions/activity-definition.md), and how to retire one that the facility no longer uses. It also describes how to make a retired activity definition active again.

## Pre-requisites

* Your facility has the activity definition that you want to change.
* If you retire the activity definition, its status is not Retired.
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Can Create Activity Definition on Facility | Lets you save your changes, retire the activity definition, or make it active again. You must hold it in the facility's root organization (**Administration**). By default, the Facility Admin role holds this permission. |
| Can Read Activity Definition | Lets you see the activity definitions in a category and open one. You can hold it in any department of the facility. By default, the Facility Admin, Administrator, Staff, Doctor, Nurse and Volunteer roles hold this permission. |
| Can Read Resource Category | Lets you browse the categories on the activity definitions page. You can hold it in any department of the facility. By default, the Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer and Pharmacist roles hold this permission. |

If you change the requirements, you also need the read permissions listed in [Link requirements to an activity definition](https://docs.ohc.network/flows/definitions/activity-definition/link-requirements-to-activity-definition.md).

Care shows **Edit** and **Delete** to everyone who can open the activity definition. If you do not hold Can Create Activity Definition on Facility in the root organization, Care refuses the change.

## Steps

### 1. Open the activity definition

1. In the facility sidebar, select **Settings**.
2. In the **Clinical** group, select **Activity Definitions**.
3. Open the category that holds the activity definition. If it has subcategories, open them until you see the list of activity definitions.
4. If the activity definition is not Active, change the **Status** filter. The list shows only Active activity definitions until you change it.
5. Select **View** on the activity definition.

To find an Active activity definition faster, type its title in the search box at the top level of the page.

![Step 1, Open the activity definition: the screen at this step, with the control for the step outlined](/assets/images/update-or-retire-activity-definition-1-356fc3aacd3a5db654d719456daf40e2.webp)

### 2. Update the details

1. Select **Edit**. You can also select **Edit** on its row in the list.
2. Change the fields that you need. For the fields, see [Create an activity definition](https://docs.ohc.network/flows/definitions/activity-definition/create-activity-definition.md).
3. Select **Save**.

Care does not change the **Slug** when you change the **Title**. You can still edit the **Slug**.

![Step 2, Update the details (1 of 3): the screen at this step, with the control for the step outlined](/assets/images/update-or-retire-activity-definition-2-1cddc27751f0c620dd56d17fffb4cf77.webp)

![Step 2, Update the details (2 of 3): the screen at this step, with the control for the step outlined](/assets/images/update-or-retire-activity-definition-3-7191ded4f757e27bd9f02287afa00002.webp)

![Step 2, Update the details (3 of 3): the screen at this step, with the control for the step outlined](/assets/images/update-or-retire-activity-definition-4-a39dfae3c5b6a0232b44018fda05a5b3.webp)

### 3. Retire the activity definition

Do this step only when the facility no longer uses the activity definition.

Care has no Retire button. The **Delete** button retires the activity definition: it sets the status to Retired and keeps the activity definition in Care.

1. On the activity definition page, select **Delete**. Care shows this button only when the status is not Retired.
2. In the dialog **Delete Activity Definition**, select **Confirm**.

![Step 3, Retire the activity definition (1 of 2): the screen at this step, with the control for the step outlined](/assets/images/update-or-retire-activity-definition-5-eb3f28923a56f74ea51a98e6fe8916b4.webp)

![Step 3, Retire the activity definition (2 of 2): the screen at this step, with the control for the step outlined](/assets/images/update-or-retire-activity-definition-6-8c02ebcf32c1294107061928e87ed1da.webp)

### 4. Make a retired activity definition active again

Do this step only when the facility needs the activity definition again.

1. In the category, set the **Status** filter to Retired.
2. Select **Edit** on the activity definition.
3. Set **Status** to Active.
4. Select **Save**.

![Step 4, Make a retired activity definition active again (1 of 3): the screen at this step, with the control for the step outlined](/assets/images/update-or-retire-activity-definition-7-24e316198066e679960e544461692904.webp)

![Step 4, Make a retired activity definition active again (2 of 3): the screen at this step, with the control for the step outlined](/assets/images/update-or-retire-activity-definition-8-b4ecbbbbed9f675c0b3b6d2b809b22e2.webp)

![Step 4, Make a retired activity definition active again (3 of 3): the screen at this step, with the control for the step outlined](/assets/images/update-or-retire-activity-definition-9-a6808eb01f53f9f190e63b6adc7d458c.webp)

## Expected Outcome

* After you save your changes, Care shows **Activity definition updated successfully** and opens the activity definition page.
* After you retire the activity definition, Care shows **Definition deleted successfully** and opens the top level of the activity definitions page.
* A retired activity definition stays in Care with the status Retired. The order form does not offer it.
* An activity definition that you set back to Active shows in the order form again.

## Related

Concepts:

* [Activity Definition](https://docs.ohc.network/concepts/definitions/activity-definition.md)

Flows:

* [Create an activity definition](https://docs.ohc.network/flows/definitions/activity-definition/create-activity-definition.md)
* [Link requirements to an activity definition](https://docs.ohc.network/flows/definitions/activity-definition/link-requirements-to-activity-definition.md)
* [Use an activity definition to order a service](https://docs.ohc.network/flows/definitions/activity-definition/use-activity-definition-to-order-a-service.md)
