# Link your facility to ABDM

## Overview

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

This flow describes how to save the Health Facility Id of your [facility](https://docs.ohc.network/concepts/facility.md) in Care, so that Care links the facility to ABDM. You can also generate a Scan and Share QR code for the facility.

Your facility needs a Health Facility Id before staff can create or link ABHA numbers, find patients by token, or fetch records over ABDM.

## Pre-requisites

* Your deployment has installed the ABDM app with its backend, and connected the app to ABDM.
* Your facility has an ABDM health facility, and you know its Health Facility Id.
* You are a member of an organization of the facility.
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Can Update on Facility | Makes the **Configurations** menu appear on the **General** settings page of the facility. You must hold it in the [root organization](https://docs.ohc.network/concepts/access-governance/facility-organization.md) of the facility. Default roles: Facility Admin, Administrator, Staff. |

## Steps

### 1. Open the facility settings

Open the facility. Select **Settings**. Select **General**.

![The General page of the facility settings, with the Configurations menu](/assets/images/configure-health-facility-1-9aa641946dfd0288ace5725f9ca14435.webp)

### 2. Open Configure Health Facility

Select **Configurations**.

Select **Configure Health Facility**. Care shows it below **Edit Facility Details**.

Care opens a panel with the title **Configure Health Facility**.

Note: If you do not see **Configurations**, you do not hold Can Update on Facility in the root organization of the facility.

![The Configurations menu with Configure Health Facility](/assets/images/configure-health-facility-2-2848b1ecd47359d86914c8701d16955c.webp)

### 3. Enter the Health Facility Id

Enter the Health Facility Id of your facility in **Health Facility Id**.

Select **Link Health Facility**.

Care saves the Health Facility Id. Then Care registers the facility as a service with ABDM in the background.

![The Health Facility Id field in the Configure Health Facility sheet](/assets/images/configure-health-facility-3-ad6856a2471ae3a8bade2939da47b44f.webp)

### 4. Check the registration status

Hold the pointer on the status icon in the panel. Read the status in the tooltip.

| Status | What it means |
| - | - |
| **Registered** | Care linked the facility and registered it as a service. The tooltip shows **No Action Required**. |
| **Not Registered** | Care linked the facility, but the registration as a service is not complete. |

If the facility is registered, Care shows **Health Facility config updated successfully**.

If the registration is not complete, Care shows a warning. The warning shows the reason, or **Health ID registration failed**.

If the status is **Not Registered**, select **Link Health Facility** again. Care retries the registration with the same Health Facility Id.

If you change the Health Facility Id later, Care sets the status to **Not Registered**. Then Care registers the facility again.

![The status icon next to the Health Facility Id, with its Not Registered tooltip](/assets/images/configure-health-facility-4-5b36963eff850adb0cdf6a2bbee8fb3b.webp)

### 5. Generate a Scan and Share QR code (optional)

Patients scan this QR code with their ABHA app to share their ABHA profile with your facility. Care then gives the patient a token in the ABDM Scan and Share Queue.

If no patient in Care has that ABHA number, Care registers the patient from the ABHA profile. Staff find the patient with the token. See [Find a patient by Scan and Share token](https://docs.ohc.network/apps/abdm/find-patient-by-abha-token.md).

After you save the Health Facility Id, Care shows **Generate Scan and Share QR** below the form.

Enter a name for the counter in **Counter Name**. The default name is 1. Use 1 to 20 characters.

Use only letters and numbers, with no spaces. Care does not stop names with spaces, so check the name yourself.

Select **Download QR Code**. Care downloads the QR code as an SVG image.

Note: The QR code holds an address that your deployment sets, with your Health Facility Id and the counter name in it. Care makes the QR code in your browser.

Note: If Care shows **Scan and share QR code is not available, Please contact the admin.**, your deployment has not set up the QR code. Contact your deployment.

![A Scan and Share QR code in the Configure Health Facility sheet, with Download QR Code](/assets/images/configure-health-facility-5-dac25a892341a60917d4d784d3f16831.webp)

## Expected Outcome

* Care saves the Health Facility Id of your facility.
* When the registration is complete, the status shows **Registered**.
* Staff at your facility can use **Generate/Link ABHA Number**.
* The patient search page shows **Find Patient by Abha Token** to staff who hold Can Create Patient in the facility.
* Encounters at your facility show **Fetch Records over ABDM** for patients with an ABHA number.
* Care links new records of patients to their ABHA numbers automatically.
* If you generated a Scan and Share QR code, you have it as an SVG image.

## Related

Concepts:

* [ABDM and ABHA](https://docs.ohc.network/apps/abdm.md)
* [Facility](https://docs.ohc.network/concepts/facility.md)
* [Facility Organization](https://docs.ohc.network/concepts/access-governance/facility-organization.md)

Flows:

* [Update facility details](https://docs.ohc.network/flows/facility/facility/update-facility-details.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)
* [Find a patient by Scan and Share token](https://docs.ohc.network/apps/abdm/find-patient-by-abha-token.md)
* [Fetch a patient's records over ABDM](https://docs.ohc.network/apps/abdm/fetch-records-over-abdm.md)
