# Fetch a patient's records over ABDM

## Overview

ABDM applies to deployments in India. To learn what ABDM and the ABHA number are, see [ABDM and ABHA](https://docs.ohc.network/apps/abdm.md).

This flow describes how to ask a [patient](https://docs.ohc.network/concepts/clinical/patient.md) for consent to fetch their health records over ABDM, and how to view the records that arrive. You raise the consent request from an [encounter](https://docs.ohc.network/concepts/clinical/encounter.md). The request waits for the patient to approve it. The records then appear on the **ABDM Records** tab of that encounter.

This ABDM consent is not the same as the consents on the **Consents** tab of the encounter. That tab holds the consent forms that your facility records for the patient. See [Consent](https://docs.ohc.network/concepts/clinical/consent.md).

## Pre-requisites

* Your deployment has installed the ABDM app with its backend, and connected the app to ABDM.
* The patient has a linked ABHA number. See [Create an ABHA number for a patient](https://docs.ohc.network/apps/abdm/create-abha-number.md) or [Link a patient's existing ABHA number](https://docs.ohc.network/apps/abdm/link-abha-number.md).
* The facility of the encounter has a Health Facility Id. See [Link your facility to ABDM](https://docs.ohc.network/apps/abdm/configure-health-facility.md).
* If the most recent encounter of the patient is in another facility, that facility also has a Health Facility Id.
* You are a member of an organization of the facility of the encounter.
* You can open the encounter of the patient. See the permissions in [Encounter](https://docs.ohc.network/concepts/clinical/encounter.md#permissions).
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Can list patients | Lets Care read the ABHA number of the patient. Without it, Care does not show **Fetch Records over ABDM**. You hold it through a role on the patient. The role comes from an organization of an active encounter or of the patient. A role given to you on the patient also counts. Default roles: Staff, Doctor, Nurse, Administrator, Facility Admin, Volunteer and Pharmacist. |

Care lists the requests only to members of an organization of the facility of the encounter.

## Steps

### 1. Open the encounter

Open the encounter of the patient. Go to the **Overview** tab.

### 2. Open the request form

In the actions on the **Overview** tab, select **Fetch Records over ABDM**. It comes after the other encounter actions.

You can also select it under **Plugin Actions** in the encounter command dialog. See [Encounter](https://docs.ohc.network/concepts/clinical/encounter.md#where-to-find-encounters).

If you do not see the action, check that the patient has a linked ABHA number. Also check that the facility has a Health Facility Id.

Care opens the **Fetch Records over ABDM** dialog.

### 3. Fill in the request

Complete the fields in the table below.

| Component | What it captures |
| - | - |
| Patient Identifier | The ABHA address of the patient. Care fills it in, and you cannot change it. |
| Purpose of Request | The reason for the request. The default is **Care Management**. |
| Health Records Date Range | The period of the records that you ask for. The default is the last 30 days. |
| Health Information Types | The types of records that you ask for. Care selects all types by default. |
| Consent Expiry Date | The date when the consent ends. The default is 30 days from today. |

Select one of these options for **Purpose of Request**:

* **Care Management**
* **Break The Glass**
* **Public Health**
* **Healthcare Payment**
* **Disease Specific Healthcare Research**
* **Self Requested**

**Health Information Types** has these options. Remove the types that you do not need.

* **Prescription**
* **Diagnostic Report**
* **OP Consultation**
* **Discharge Summary**
* **Immunization Record**
* **Health Document Record**
* **Wellness Record**

### 4. Send the request

Select **Request Consent**.

Care sends the request to ABDM. If the request succeeds, Care shows "Consent requested successfully!".

Without a working connection to ABDM, Care cannot save the request.

The request then waits for the patient to approve it.

Care sends the request in the name of the facility of the most recent encounter of the patient. This can be a different facility from the facility of this encounter.

If that facility has no Health Facility Id, the request fails. The message is "The facility to which the patient is linked does not have a health facility linked".

Care limits how many requests you can raise for the same ABHA number. If you reach the limit, the request fails with "Request limit reached" and a time to try again.

### 5. Open the ABDM Records tab

Select the **ABDM Records** tab of the encounter.

Care lists the consent requests raised from this encounter, newest first.

If there are no requests, Care shows "No Records Found" and "Raise a consent request to fetch patient records over ABDM".

Care shows this tab on every encounter. If the encounter uses a workspace with its own list of tabs, Care shows only those tabs. If that list does not include **ABDM Records**, Care does not show the tab.

![The ABDM Records tab of an encounter that has no consent requests yet](/assets/images/fetch-records-over-abdm-1-84a04398f222883c110da51ab8909286.webp)

### 6. Read the consent card

Each consent card shows the details below.

| Component | What it shows |
| - | - |
| Purpose | The purpose of the request. |
| Status badge | The status of the consent: **Requested**, **Granted**, **Denied**, **Expired** or **Revoked**. |
| Valid until | The date until which the consent is valid. |
| Records requested from ... to ... | The date range of the records that you asked for. |
| HI Types | The types of health information that you asked for. |
| Created On | The date when the request was created. |
| Modified On | The date of the last change to the request. |
| Check Status | A button that asks ABDM for the latest status. |

### 7. Check the status

Select **Check Status** on the consent card. Care asks ABDM for the latest status of the consent.

Care shows a message that the check has started. The check can take some time.

Come back to the tab later to see the new status.

### 8. View the records

Expand the consent card. Care shows one card for each consent artefact.

| Component | What it shows |
| - | - |
| Facility name | The facility that sends the records. If Care does not know the facility, the card shows **Unknown Facility**. |
| Status | **Waiting** while the record has not arrived. **Fetched** when the record has arrived. |
| View | A button that opens the record. |

If the consent card has no artefacts and the status is **Requested**, Care shows "Waiting for the Patient to approve the consent request".

If the consent card has no artefacts and the status is not **Requested**, Care shows "Patient has rejected the consent request" for every such status. Read the status badge for the real status.

Select **View** on an artefact card. Care opens the **Health Information** page.

If the record has not arrived, the page shows "This record hasn't been fetched yet". Check again after some time.

If the record is archived, the page shows "This record has been archived".

Select **Back** to return to the **ABDM Records** tab.

## Expected Outcome

* Care sends the consent request to ABDM and lists it on the **ABDM Records** tab.
* The consent card shows the status of the request.
* When a record arrives, you can open it on the **Health Information** page.

## Related

Concepts:

* [ABDM and ABHA](https://docs.ohc.network/apps/abdm.md)
* [Consent](https://docs.ohc.network/concepts/clinical/consent.md)
* [Encounter](https://docs.ohc.network/concepts/clinical/encounter.md)

Flows:

* [Link your facility to ABDM](https://docs.ohc.network/apps/abdm/configure-health-facility.md)
* [Create an ABHA number for a patient](https://docs.ohc.network/apps/abdm/create-abha-number.md)
* [Link a patient's existing ABHA number](https://docs.ohc.network/apps/abdm/link-abha-number.md)
* [View consents](https://docs.ohc.network/flows/clinical/consent/view-consents.md)
