> ## 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.

# Randomization

> Configure permuted-block randomization and generate the allocation list for your study

Randomization assigns enrolled participants to study arms from a pre-generated, auditable schedule instead of manual arm selection. Carelane uses a **permuted-block** method with a fixed block size. Every site stays balanced across arms as participants are enrolled.

The randomization list is generated and extended **manually** by the study team, so you always control when the schedule is created and how much capacity is available to sites.

## When to use randomization

Enable randomization when your protocol calls for a controlled trial and each participant must be assigned to a study arm by chance.

Skip randomization for observational studies, single-arm studies, or studies where arm assignment follows clinical criteria.

## Prerequisites

* Two or more [study arms](https://docs.carelane.io/study-design/study-arms.md) defined on the study.
* A block size that is a multiple of the number of arms. For example, use 4 or 6 with 2 arms, or 6 or 9 with 3 arms. Carelane rejects block sizes that do not divide evenly across arms.

## Randomization workflow

Randomization has an explicit, ordered workflow. Carelane guides you through each step with inline alerts on the study setup page.

**1. Define study arms**

Create at least two [study arms](https://docs.carelane.io/study-design/study-arms.md) on the study.

**2. Enable randomization**

On **Study Editor > Settings > Study Setup**, turn on randomization. Carelane opens a confirmation dialog before enabling or disabling randomization so the change is deliberate.

**3. Configure randomization parameters**

Set the block size, per-site enrollment targets, and the over-enrollment allowance in the single randomization form. Carelane validates the form and only accepts it when the values are compatible with the current arm list.

**4. Approve the first CRF version**

Approving the first CRF version **locks** the randomization configuration for the lifetime of the study. It does not yet generate the list.

**5. Generate the randomization list**

After the first CRF version is approved, open the randomization section and generate the list. This step is manual and required — the study cannot be started until the list exists.

**6. Start the study and enroll sites**

Start the study, then enroll sites as usual. Each site draws blocks from the list as it enrolls participants.

**7. Extend the list as capacity runs low**

Carelane shows a low-capacity warning when fewer than 10% of the total blocks or fewer than 10 blocks remain unassigned. Extend the list manually to add more blocks before sites are blocked from enrolling.

> [!WARNING]
>
> Review your block size, arm list, per-site targets, and over-enrollment allowance before approving the first CRF version. After approval you cannot change the randomization configuration without unlocking randomization through Carelane support.

## Randomization configuration

The randomization form combines all parameters into a single, validated input:

| Field | Description |
| - | - |
| **Block size** | Number of allocations per block. Must be a multiple of the number of arms. |
| **Per-site enrollment target** | The number of participants each site is expected to enroll. Used to estimate the total block count for the initial list. Blocks are not tied to a specific site and can be consumed by any site as needed. |
| **Over-enrollment allowance** | Additional capacity beyond the target that a site is allowed to use before being blocked. |

Changes to the form are applied only when you explicitly submit. Enabling or disabling randomization at the study level requires confirmation in a dialog.

## Generating the randomization list

Until the list is generated, Carelane displays an alert on the study setup page and **blocks the study from starting**. Generate the list from the randomization section:

1. Confirm the configuration in the generation dialog. Carelane shows the total number of blocks and allocations it will create based on your per-site targets and over-enrollment allowance.
2. Confirm to generate. Carelane creates the full sequence and stores it with the study.
3. Start the study once the list is present.

## How allocation works during enrollment

The schedule is a single ordered sequence of arm assignments, not a per-site list. When a site enrolls a participant in a randomized study:

1. Carelane assigns the next unused position from the site's current block.
2. When a site completes a block, Carelane hands it the next available block from the shared sequence.
3. Carelane draws the next block on demand. Early-enrolling sites get earlier blocks and slower sites take later ones.

Every site stays balanced across arms at every completed block boundary.

### Enrollment is blocked when capacity is exhausted

If a site tries to enroll a participant and no free block or slot is available for that site, Carelane **rejects the enrollment with an error**. The site team sees the error immediately and cannot create the participant record.

To unblock enrollment, the study team must extend the randomization list (see below).

### Low-capacity warning

Before enrollment is blocked, Carelane shows a low-capacity warning to the study team on the study setup page when fewer than 10% of the total blocks or fewer than 10 blocks remain unassigned. Use the warning as a cue to extend the list before sites are affected.

### Example

With 2 arms and a block size of 4, a generated sequence starts:

```text theme={null}
Block 1: [B, A, B, A]
Block 2: [A, B, A, B]
Block 3: [B, B, A, A]
...
```

If Site 1 enrolls the first 4 participants, they receive Block 1 (B, A, B, A). The 5th participant, whether at Site 1 or Site 2, starts Block 2.

## Extending the randomization list

Extending the list is manual. Open the randomization section and confirm the extension in the dialog. Carelane appends new blocks to the existing sequence without changing any prior allocations. Existing site block assignments and participant allocations are preserved.

Extend the list when Carelane shows the low-capacity warning on the study setup page.

## Randomized participant details

Randomized participants show a **Randomized** tag on the participant details page. The CRF PDF export includes the arm assignment and the randomization event.

## Randomization log

The randomization log is a read-only record of every participant assigned to a study arm by randomization. Open it from the **Randomization Log** section on **Study Editor > Settings > Study Setup**, in the **Study Arms & Randomization** tab. On a site page, the log shows only the allocations for that site.

The log stays collapsed until you select **Show Randomization Log**. Carelane writes an audit event to the study or site audit trail each time a user opens the log.

Once the log is visible, users with permission to manage randomization see an **Update** button that reloads the log, for example after the list was extended, and a **Download PDF** button that exports the log as a PDF report.

### Log columns

| Column | Description |
| - | - |
| **Participant** | Pseudonym of the randomized participant. |
| **Site** | Site the participant was enrolled at. Hidden in the site-scoped view. |
| **Arm** | Study arm the participant was allocated to. |
| **Randomized on** | Date and time of the allocation. The log sorts by this column, newest first, by default. |
| **Randomized by** | User who enrolled and thereby randomized the participant. |
| **Block index** | Index of the block in the randomization sequence the allocation was drawn from. |
| **Position in block** | Position of the allocation within its block. |

You can sort, filter, and group the log by any column, and export it as a CSV file. Exported rows include the underlying participant, site, arm, and user IDs alongside the display names.

### PDF export

Select **Download PDF** above the log to export the current log snapshot as a landscape A4 PDF report. Use the export to archive the allocation state or share it with auditors outside of Carelane.

The report contains:

* **Randomization settings**: the method (permuted block, stratified by site), number of study arms, block size, expected number of sites, target enrollment per site, over-enrollment allowance, and the initial block and slot count.
* **Randomization list status**: total, allocated, and remaining blocks and slots at the time the log was loaded.
* **Randomization allocations**: the full log table with the same columns as the on-screen log.

Exporting the PDF requires permission to manage randomization. When exported from a site page, the report is scoped to that site and names the site below the study.

Each page carries the generation timestamp and page numbers in the footer. The file name follows the pattern `Randomization-Log_<study>_<site>_<timestamp>.pdf`, with the site part included only for site-scoped exports.

### Allocation summary

Above the log, users with permission to manage randomization see the current capacity of the study-wide list:

* **Total blocks / slots**: the full size of the current randomization list, including the initially generated list plus any later extensions.
* **Allocated blocks / slots**: blocks handed to sites and slots already used by enrollments.
* **Remaining blocks / slots**: unassigned capacity still available to sites.

Use the remaining counts together with the low-capacity warning to decide when to [extend the list](#extending-the-randomization-list).

### Access

Viewing the study-wide log requires a study role with permission to read the randomization log. Site team members with the matching site-level permission see the site-scoped log on their site page instead.

## Related

> [card] [Study Arms](https://docs.carelane.io/study-design/study-arms.md)
>
> Define the arms that randomization allocates participants to.

> [card] [Participant Enrollment](https://docs.carelane.io/participants/enrollment.md)
>
> Enroll participants into a randomized study.


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