# Cancel a dispense order

## Overview

[Video: Cancel a dispense order](https://www.youtube.com/watch?v=Fglb-QzqTkQ)

This flow describes how to cancel a [dispense order](https://docs.ohc.network/concepts/medications/dispense-order.md) at a pharmacy location with **Mark as Abandoned** or **Mark as entered in error**.

When you cancel an order, Care cancels all its dispenses and puts their quantities back into stock. You cannot undo this.

## Pre-requisites

* The dispense order is Draft, In Progress or Completed.
* If the order has an issued or balanced invoice, you cancel that invoice first.
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Pharmacist in Care | Find and open the dispense order, and cancel it. You must hold it in a department of the facility. By default, the Facility Admin and Pharmacist roles hold this permission. |
| Medication Dispense Read | See the dispenses and invoices of the order. You must hold it in a department of the pharmacy location. By default, the Facility Admin, Staff, Doctor, Nurse and Pharmacist roles hold this permission. |
| Can List Facility Locations | Open the pages of the pharmacy location. You must hold it in a department of the location. By default, the Doctor, Facility Admin, Administrator, Nurse, Staff and Pharmacist roles hold this permission. |
| Can Read Invoice | See the invoices of the order in the payment banners. You must hold it in a department of the facility. By default, the Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer and Pharmacist roles hold this permission. |
| Can Destroy Invoice | Cancel an issued or balanced invoice of the order, which you must do before you cancel the order. You must hold it in a department of the facility. By default, only the Facility Admin role holds this permission. See [Cancel an invoice](https://docs.ohc.network/flows/billing/invoice/cancel-invoice.md). |

Without "Pharmacist in Care", a user needs "Can Read Supply Delivery" to find and open the order. The user also needs "Can Create Supply Delivery on Facility" to cancel it. Both must be held in a department of the pharmacy location. By default, only the Facility Admin role holds "Can Create Supply Delivery on Facility".

By default, the Staff, Doctor and Nurse roles cannot cancel a dispense order.

## Steps

### 1. Open the dispense order

Open the order on the **Dispense Medicines** page. See [Find and print a dispense order](https://docs.ohc.network/flows/medications/medication-dispense/find-dispense-order.md).

![A dispense order with Status: In Progress outlined, and an issued invoice under Payment status](/assets/images/cancel-dispense-order-1-b905a17411356ac8a32edc5eff9a1098.webp)

### 2. Cancel an issued invoice

Care shows a payment banner above each group of dispenses on an invoice.

If a banner shows an issued or balanced invoice, open the menu on that banner and select **Cancel Invoice**.

If the order is Draft or In Progress, the banner then shows **Invoice Not Generated**. Care also shows the **Add Medication** field. Do not issue a new invoice. Go on to step 3.

For the rules that apply to cancelling an invoice, see [Cancel an invoice](https://docs.ohc.network/flows/billing/invoice/cancel-invoice.md).

Note: Care does not let you cancel the order while it has an issued or balanced invoice. A draft invoice does not stop you.

![The arrow next to Collect Payment outlined](/assets/images/cancel-dispense-order-2-b49da0289bc3c8010db979c66d70bb6e.webp)

![The invoice menu open, with Cancel Invoice outlined](/assets/images/cancel-dispense-order-3-bc83dfa62c0b6cdcfc3dac8b5989e7a3.webp)

![The Confirm dialog for cancelling the invoice, with the Confirm button outlined](/assets/images/cancel-dispense-order-4-7ddde30e263ac9bc9f029fcfcea033fd.webp)

### 3. Select how to cancel the order

1. At the bottom of the page, select the ⋮ button (**More Actions**).
2. Select the action that fits the reason.

| Action | When to use it |
| - | - |
| **Mark as Abandoned** | The order stopped before it was completed. |
| **Mark as entered in error** | The order was created by mistake. |

![The More Actions button outlined at the bottom of the order, with the banner Invoice Not Generated](/assets/images/cancel-dispense-order-5-8727ac8ebdbdc394c2cb88347b1977b1.webp)

![The More Actions menu open, with Mark as Abandoned outlined and Mark as entered in error above it](/assets/images/cancel-dispense-order-6-4046106e650c89e3d502d1c9f7c6430c.webp)

### 4. Confirm

Care opens a confirmation with the name of the action. It says that you cannot undo the action.

Select **Confirm**. To go back without a change, select **Cancel**.

Note: If an issued or balanced invoice remains, Care says that the order cannot be cancelled. Select **Close**, and cancel the invoice first.

![The Mark as Abandoned dialog with the Confirm button outlined](/assets/images/cancel-dispense-order-7-6a3c5cbeab8b8968a5f74b456ae20279.webp)

![The order at Status: Abandoned, outlined, with its dispenses listed under Cancelled Dispenses](/assets/images/cancel-dispense-order-8-1ef39daceb5be14fb5806afed0d0a0bc.webp)

## Expected Outcome

* The order shows the status Abandoned or Entered in Error. You cannot change its status again.
* Care cancels every dispense of the order. If you abandon the order, its dispenses become Cancelled. If you mark it entered in error, its dispenses become Entered in Error.
* Care cancels the charge items of those dispenses, and puts their quantities back into stock at the location.
* Care sets the dispense status of the prescribed medicines back to Incomplete.
* The patient card on the order shows **Print**, **Prescription Queue** and **Go to Dispenses**. If the patient has an account, it also shows **View Account**.
* The order moves to the **History** tab of the **Dispense Orders** page.

## Related

Concepts:

* [Dispense Order](https://docs.ohc.network/concepts/medications/dispense-order.md)
* [Medication Dispense](https://docs.ohc.network/concepts/medications/medication-dispense.md)
* [Invoice](https://docs.ohc.network/concepts/billing/invoice.md)

Flows:

* [Find and print a dispense order](https://docs.ohc.network/flows/medications/medication-dispense/find-dispense-order.md)
* [Put a dispense order on hold and resume it](https://docs.ohc.network/flows/medications/medication-dispense/put-dispense-order-on-hold.md)
* [Collect payment and complete a dispense order](https://docs.ohc.network/flows/medications/medication-dispense/complete-dispense-order.md)
* [Cancel an invoice](https://docs.ohc.network/flows/billing/invoice/cancel-invoice.md)
