# Fill a patient registration from a scanned form

## Overview

[Video: Fill a patient registration from a scanned form](https://www.youtube.com/watch?v=gwMitU2Nb68)

This flow describes how to use [AI Vision](https://docs.ohc.network/apps/ai-vision.md) to fill the registration form for a new [patient](https://docs.ohc.network/concepts/clinical/patient.md) from an image or a PDF file of a filled paper form. You then check the values and register the patient as usual.

## Pre-requisites

* Your deployment has installed the AI Vision app and the Filly backend service.
* You turned on AI Vision for your account. See [Turn on AI Vision for your account](https://docs.ohc.network/apps/ai-vision/turn-on-ai-vision.md).
* You register a new patient. AI Vision does not appear when you update an existing patient.
* You have an image or a PDF file of the filled registration form, or a phone to photograph it.
* You can register a patient in this facility. See [Register a patient](https://docs.ohc.network/flows/clinical/patient/register-patient.md).
* You have the permission listed below.

## Permissions

| Permission | Access |
| - | - |
| Can Use Filly | Lets AI Vision read the scanned form. You can hold it through a role in any organization of the facility. Default roles: Doctor, Nurse, Staff, Facility Admin and Administrator. Pharmacist and Volunteer do not have it by default. The **AI Vision** button appears without this permission. |

## Steps

### 1. Open the registration form

Open **Register New Patient** in your facility. See [Register a patient](https://docs.ohc.network/flows/clinical/patient/register-patient.md).

![The Register New Patient form](/assets/images/fill-patient-registration-from-a-scan-1-fb2d11cadac9c433c800db0e672480f1.webp)

### 2. Start AI Vision

Warning: If you already typed values in the form, AI Vision replaces them in each field that it fills. It does not ask first.

Select the floating **AI Vision** button at the bottom right of the page. Its tooltip is **Scan Registration Form**.

![The floating AI Vision button on the registration form](/assets/images/fill-patient-registration-from-a-scan-2-46fd27f329153aca1c3a1eeb52c1916c.webp)

### 3. Select the image or PDF file

AI Vision opens the file picker of your device.

Select one image or one PDF file of the filled form.

On a phone, the file picker can open the rear camera. Take a photo of the form.

If you select another type of file, AI Vision shows "Please upload an image or PDF file".

### 4. Wait while AI Vision reads the form

While AI Vision reads the form, it shows "Extracting patient details…".

AI Vision then fills the fields. It shows the number of fields that it fills, and then the number of fields that it extracted.

If AI Vision cannot read the form, it shows the error message and **Try again**.

If you do not have Can Use Filly in this facility, AI Vision shows "You do not have permission to use filly."

If AI Vision gets no result in about two minutes, it stops and shows "Medispeak session timed out waiting for a result".

![AI Vision reading the scanned form](/assets/images/fill-patient-registration-from-a-scan-3-a251f336f2b8a5681766a261d912fc65.webp)

### 5. Check the filled fields

AI Vision reads these details from the form:

* Full name
* Phone number and emergency phone number
* Gender
* Date of birth or age
* Blood group
* Current address and permanent address
* PIN code
* State, district, local body and ward

AI Vision does not turn on **Use a different emergency contact number**. While it is off, Care saves the phone number as the emergency number.

If the paper form has a different emergency number, turn on **Use a different emergency contact number** and check the number.

Compare each filled value with the paper form.

Correct the values that are wrong.

![The registration form with the fields that AI Vision filled](/assets/images/fill-patient-registration-from-a-scan-4-2bc7e9b85fc234274d974332f5320a83.webp)

### 6. Select the location fields

If AI Vision cannot match the state, district, local body or ward to Care, it does not fill that field.

Select these fields yourself.

![The location fields of the registration form](/assets/images/fill-patient-registration-from-a-scan-5-ff1b9bafdcab62dc9002bae82aff4607.webp)

### 7. Complete and save the registration

Complete the other fields of the form. Then save the patient, as in [Register a patient](https://docs.ohc.network/flows/clinical/patient/register-patient.md).

![The completed registration form with Register Patient](/assets/images/fill-patient-registration-from-a-scan-6-9aa78c7c652062b9f3218d35ab4dee43.webp)

## Expected Outcome

* The registration form shows the values that AI Vision read from the scanned form, with your corrections.
* In each field that AI Vision filled, the value from the scan replaced any value that you typed before.
* Location fields that AI Vision could not match are left for you to select.

## Related

Concepts:

* [AI Vision](https://docs.ohc.network/apps/ai-vision.md)
* [Patient](https://docs.ohc.network/concepts/clinical/patient.md)

Flows:

* [Register a patient](https://docs.ohc.network/flows/clinical/patient/register-patient.md)
* [Turn on AI Vision for your account](https://docs.ohc.network/apps/ai-vision/turn-on-ai-vision.md)
