# Take a photo and upload it

## Overview

[Video: Take a photo and upload it](https://www.youtube.com/watch?v=bJENiiVSLbQ)

This flow describes how to take a photo with the camera of your device and upload it as a [file](https://docs.ohc.network/concepts/clinical/files.md) to a patient or to an encounter in Care.

After you keep the photo, Care opens the same upload dialog as in [Upload a file](https://docs.ohc.network/flows/clinical/files/upload-a-file.md).

## Pre-requisites

* Your device has a camera, and you can let your browser use it.
* The patient is registered in Care, and you can open the patient's page or the encounter.
* If you upload to an encounter, you opened the encounter from a facility. Outside a facility, for example from an organization, the encounter's **Files** tab is read-only.
* If you upload to an encounter, you look at the encounter that you opened, not another encounter of the patient.
* If you upload to an encounter, its status is not Completed, Cancelled, Entered in error or Discontinued.
* If you upload to an encounter, the encounter workspace layout does not hide the **Files** tab.
* You have the permissions listed below.

## Permissions

| Permission | Access |
| - | - |
| Can Update a Patient's data | Upload a photo to the patient. Care shows **Add Files** on the patient's **Files** tab only with this permission. Hold it through [a role on the patient](https://docs.ohc.network/concepts/clinical/files.md#permissions). By default, Staff, Doctor, Nurse, Administrator and Facility Admin hold it. |
| Update Encounter related clinical data | Upload a photo to an encounter. Hold it in a [department](https://docs.ohc.network/concepts/facility/department.md) of the encounter or of its current location. Nobody can upload files to a closed encounter. By default, Doctor, Nurse and Facility Admin hold it. |
| Update Encounter non clinical | Care shows **Add Files** on the encounter's **Files** tab only with this permission. Hold it through a role on the encounter. By default, Doctor, Nurse and Facility Admin hold it. |
| Can view clinical data about patients | Shows the patient's **Files** tab and lists the patient files. Also shows the encounter's **Files** tab. Hold it through [a role on the patient](https://docs.ohc.network/concepts/clinical/files.md#permissions). By default, Staff, Doctor, Nurse and Facility Admin hold it. |
| Can Read encounter related clinical data | Shows the encounter's **Files** tab and lists the encounter files. Hold it in a department of the encounter or of its current location. By default, Doctor, Nurse and Facility Admin hold it. |

Note: By default, the Administrator role holds "Can Update a Patient's data" but not "Can view clinical data about patients". So a user who has only the Administrator role cannot open the patient's **Files** tab, and cannot upload files there.

## Steps

### 1. Open the Files tab

To upload to the patient, open the patient's page. Select the **Files** tab.

To upload to an encounter, open the encounter. Select the **Files** tab, or press `g` and then `f`.

Care opens the **Files** sub-tab.

![The Files tab of the Patient Details page, with Add Files](/assets/images/take-a-photo-1-28beea25a50370ca13bacd7ae02945d0.webp)

### 2. Open the camera

Select **Add Files**. Select **Open Camera**.

Care opens the camera. The camera fills the height of the screen.

![Open Camera in the Add Files menu](/assets/images/take-a-photo-2-9c0e66b7ef7e3e2319e1d8ee26746c46.webp)

### 3. Allow access to the camera

While the browser asks for access, Care shows **Requesting Camera Access** and **Please allow camera permissions in your browser**.

Allow the browser to use the camera.

If access to the camera is denied, Care shows **Camera permission denied** and two steps.

Select the settings icon in the address bar of the browser. Clear the blocked camera permission.

### 4. Choose the camera

On a small screen, Care starts with the back camera. Select the switch button to change between the back camera and the front camera. If the device has no back camera, Care shows **Switch camera is not available.**

On a large screen, Care starts with the camera you used last in this browser, or with the first camera in the list. If there is more than one camera, select the switch camera button, then select a camera in the **Select Camera** menu.

### 5. Take the photo

Take the photo. Care shows the photo with three buttons. The buttons show an icon and no text.

| Button | What it does |
| - | - |
| Check (confirm) | Keeps the photo, closes the camera, and opens the upload dialog. |
| Retake | Removes the photo and goes back to the camera, so that you can take the photo again. |
| Close | Closes the camera and removes the photo. |

![The camera view with the switch camera button, the shutter button and the close button](/assets/images/take-a-photo-3-548e6daf57df455d1a1110613b639342.webp)

caution

The retake button and the close button remove all the files that you chose, not only the photo.

### 6. Keep the photo

Select the check button.

Care closes the camera and opens the upload dialog with the photo.

![The photo taken, with the retake, check and close buttons](/assets/images/take-a-photo-4-6b4bb202d04e38a2d937bc03fd7be5cb.webp)

### 7. Name and upload the photo

Enter a name in the **File Name** field. The field is required, and it starts empty.

Select **Upload**.

For the other options in the dialog and for the messages that Care can show, see [Upload a file](https://docs.ohc.network/flows/clinical/files/upload-a-file.md).

![The Upload File dialog with the photo and Referral letter in the File Name field](/assets/images/take-a-photo-5-f39b25647d5306aff30d1db4ecbb06d1.webp)

![The message File Uploaded Successfully, and Referral letter.png at the top of the Files list](/assets/images/take-a-photo-6-10952942fd49cb1a916fa72de126691e.webp)

## Expected Outcome

* Care shows **File Uploaded Successfully**.
* The photo shows in the **Files** list of the patient or of the encounter, with the name that you entered.
* The photo is at the top of the list, unless a search or a filter hides it.

## Related

Concepts:

* [Files](https://docs.ohc.network/concepts/clinical/files.md)

Flows:

* [Upload a file](https://docs.ohc.network/flows/clinical/files/upload-a-file.md)
* [Record audio and upload it](https://docs.ohc.network/flows/clinical/files/record-audio.md)
* [Find a file](https://docs.ohc.network/flows/clinical/files/find-a-file.md)
* [View or preview a file](https://docs.ohc.network/flows/clinical/files/view-or-preview-a-file.md)
