> ## Documentation Index
> Fetch the complete documentation index at: https://docs.carelane.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Source Data Capture

> Upload lab reports, scans, or screenshots and let the AI suggest matching CRF field values you review, apply, or dismiss

Source Data Capture reads values out of source documents — lab reports, radiology PDFs, scanned notes, screenshots — and suggests them for the matching fields of a participant pathway. Instead of transcribing dozens of values by hand, you upload the documents, review each suggestion next to its field, and apply or dismiss it. No value ever enters the participant record automatically.

> [!NOTE]
>
> Source Data Capture is a **Beta** feature. AI-generated suggestions can be inaccurate or incomplete — always verify each value against the source document before applying it.

## Enabling Source Data Capture

Source Data Capture is off by default and must be turned on per study. A study team member with permission to manage sites enables it under **Study > Setup > Site Settings**. Active studies must be in amendment to change the setting. See [Study Configuration](https://docs.carelane.io/study-design/study-configuration.md#source-data-capture).

## Where It Runs

Open a participant's pathway (CRF) in edit mode. When Source Data Capture is enabled for the study, site members with write permission see a **Source data capture** button in the toolbar. The button, the per-field suggestion banners, and the suggestion tags are hidden when:

* You are viewing the pathway read-only
* You lack site write permission
* You hold both study and site roles but are viewing as study team

If the study disables Source Data Capture, you cannot start new extractions. Suggestions that already exist stay visible, so you can still apply or dismiss them. The **Source data capture** button stays available only when the pathway already has extractions, so you can reach their history and stop a running one.

## Running an Extraction

**1. Open the Drawer**

Click **Source data capture** in the participant pathway toolbar.

**2. Stage Your Files**

Drop PDF or image files into the upload area — up to 12 files and 9 MB in total per extraction. A running size total shows how much of the limit you have used, and you can remove staged files before starting.

**3. Run the Extraction**

Click **Run extraction**. Files are processed in parallel, and suggestions stream in below their matching fields as the AI finds them — a slow document does not block the others.

**4. Review Each Suggestion**

Apply or dismiss every suggestion field by field. Both decisions are recorded in the audit trail.

While an extraction runs, the drawer shows live *read x of y* progress, the toolbar button shows a spinner, and a **Stop extraction** button cancels the remaining files. The extraction keeps running if you close the drawer or navigate away.

> [!WARNING]
>
> File names appear in the extraction history and in the audit trail. Rename files whose names contain patient-identifying information before uploading them.

## Reviewing Suggestions

Each suggestion appears as a banner directly below its field, showing:

| Element | Meaning |
| - | - |
| **Suggested value** | The value the AI proposes, formatted like the field's own display |
| **Confidence tag** | How certain the AI is about the match |
| **Source quote** | The verbatim excerpt from the document the value was read from |
| **Provenance** | Source file name, confidence, reasoning, and the extraction batch id |
| **Overwrites tag** | Shown only when the field already holds a different value, with the current value struck through |

Collapsed question group headers carry an **N AI Suggestions** tag, so pending suggestions stay visible while a section is closed.

### Apply

**Apply** writes the value through the same path as a hand-typed entry: validation, conditional logic, calculated fields, and the normal data-update audit event all behave exactly as if you had typed the value yourself.

### Dismiss

**Dismiss** removes the suggestion without changing the field. If a later extraction finds the same value again, the suggestion returns collapsed to a single line with a **Show** link, so re-uploading a document does not spam you with values you already rejected. For a field marked as sensitive, Carelane cannot compare encrypted values. Any new suggestion for a sensitive field returns collapsed if you dismissed a suggestion for that field before.

A pending suggestion is also dropped automatically when you edit its field by hand, when the field is hidden by a condition, or when its extraction is deleted. Suggestions are personal and belong to the participant they were extracted for. Only the user who ran the extraction can see them, and only while they still have write permission for the site.

### Sensitive fields

For a field marked as sensitive, Carelane encrypts the suggested value, the source quote, and the reasoning with the site's key as soon as the extraction finds them. They stay encrypted while the suggestion is pending and after you apply or dismiss it. Carelane decrypts them only to show them in the banner and records the decryption in the audit trail once per participant page.

If a sensitive suggestion cannot be decrypted, the banner shows **The AI suggestion for this field could not be decrypted.** Click **Retry** to try again, or **Dismiss** to drop the suggestion.

## Which Fields Get Suggestions

The AI only suggests values for fields a site user fills in by hand. Excluded:

* Fields inside repeating groups
* Read-only and calculated fields
* Score and points fields

Suggestions are validated before they reach you: the answer type must match the field type, choice answers must resolve to one of the field's own answer options, a quantity whose unit differs from the field's unit is discarded, and low-confidence candidates are dropped.

For a multiple-choice question, the AI suggests every answer option the source document supports. The banner lists all suggested options, and **Apply** saves all of them. For a single-choice question, a candidate that matches more than one option is ambiguous and is dropped.

### Fields that already have an answer

The AI also reads values for fields that already hold an answer. It never receives the answers in the CRF. Instead, Carelane compares each value the AI finds with the field's current answer:

* **Same value**: No suggestion is shown.
* **Different value**: The suggestion is shown with the **Overwrites** tag and the current value struck through.

Coded answers, such as choice options, are compared by their code. For multiple-choice questions, Carelane compares the set of selected options, so the order does not matter. Quantity answers are compared by their value. Use this to catch values that were typed incorrectly before you uploaded the source document.

Sensitive answers are stored encrypted, so Carelane cannot compare them during extraction. A value found for a sensitive field is always suggested. The banner decides whether to show the **Overwrites** tag after it decrypts the values.

## Extraction History

The drawer lists recent extractions with their files, status, and suggestion count:

| Status | Meaning |
| - | - |
| **Processing** | Extraction is running; live per-file progress is shown |
| **Complete** | All files were read |
| **Partial** | Some files failed; failed file names are marked in the list |
| **Aborted** | You stopped the extraction |
| **Error** | The extraction failed entirely |
| **Deleted** | The entry was removed but stays in the history |

Deleting an extraction removes the open suggestions it produced. Values you already applied stay in the participant record, and the entry remains in the history marked as deleted, so the record of what was uploaded survives.

## Privacy and Audit

* **Documents are not stored.** Uploaded files are transferred encrypted, read once for the extraction, and then discarded — only the file names remain in the history.
* Files are processed in the applicable jurisdiction and are not used to train AI models.
* Applying or dismissing a suggestion writes an audit event that records the target field, the accepted value, the confidence, the reasoning, the source quote, and the source file name — so an applied AI value is always traceable to the document excerpt it came from.
* For sensitive fields, the value, source quote, and reasoning in that audit event are stored encrypted with the site's key. Carelane takes the recorded value from the stored suggestion, not from your browser.

## Limitations

* Fields inside repeating groups are not supported.
* One suggestion is shown per field; there is no bulk accept-all.
* Suggestions are per-user — deleting an extraction removes only your own open suggestions.

## Related

> [card] [Data Entry](https://docs.carelane.io/data-collection/data-entry.md)
>
> Entering and validating participant data by hand.

> [card] [Audit Trails](https://docs.carelane.io/security-compliance/audit-trails.md)
>
> How every apply and dismiss decision is recorded.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.