Team Lead, Research Informatics, Women and Children’s Health Research Institute
Health Research Data Strategist, College of Health Sciences
University of Alberta
5-083 Edmonton Clinic Health Academy (ECHA)
11405 87 Avenue NW Edmonton, AB T6G 1C9
WCHRI is a partnership between the University of Alberta and Alberta Health Services, funded by the generosity of the Stollery Children's Hospital Foundation and the Alberta Women’s Health Foundation.
The University of Alberta respectfully acknowledges that we are situated on Treaty 6 territory, traditional lands of First Nations and Métis people.
I'd like to create a project at our institute which uses the randomization module. The treatment allocation is pretty straightforward of 1:1:1, but the doctor writing the protocol would like the participants to be allocated to blocks as well so that this translates to a larger trial. Currently no stratification by demographic or condition is required. Certain randomisation systems like Sealed Envelope can support random permuted blocks, but I'm struggling to see how to activate this, or how to import this as an option into the randomisation template you upload to REDCap. Does anyone have any ideas?
--
You received this message because you are subscribed to the Google Groups "Redcap Open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redcap_open...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/redcap_open/c961e0c0-af81-4fd9-8a71-6d028926ad83n%40googlegroups.com.
Hello Liz,
You just need to set up your project with a field for the target allocation (i.e. groups) and any stratification factors (or none, in your case), then set up the randomisation model to use them. REDCap does not need to know about block sizes because it does not generate your schedule itself, only gives you the examples so you know what columns and values to use for allocation and stratification. That means you can generate your schedule to whatever specification you like in terms of allocation ratio and block size, using whatever tool it suits you best to use.
Our statisticians at Murdoch Children’s use Stata, for which there exists a package named “ralloc” (http://fmwww.bc.edu/repec/bocode/r/ralloc.html) that makes permuted block schedule generation very easy. You just plug your parameters into the function according to your requirements. For example:
ralloc block_id block_size arm, /// column names for block and group info
seed(22072025) /// seed for random number generation - for repeatability
nsubj(60) /// number of records per stratum
ntreat(3) /// number of allocation groups
ratio(1) /// allocation ratios
init(3) /// smallest block size
osize(2) /// number of block sizes
strata(2) /// number of strata
equal /// use equal frequency for block sizes
saving("example") /// save to dta file
gen randid=_n

There will be similar packages available for other software, no doubt. The important thing is to generate the schedule in a transparent, robust, and reproducible manner, and independently of the trial team. Our SOP allows the trial statistician to generate the Stata script to meet the requirements of the Protocol, but it is always an independent statistician that sets the seed and runs it. The list is then checked by a second independent statistician and passed to me or someone in my REDCap admin team for uploading into the project. The trial statistician and project team are not involved in those steps.
Beyond that, I always recommend you maintain any id/randomisation number generated with the schedule and upload as REDCap’s redcap_randomization_number values. This way you will maintain the traceability between the generated schedule and record allocations. I would also suggest capturing server time of randomisation using a datetime_seconds field with the @CALCDATE([rand-time],0,'s') action tag (and maybe also the utc time should you ever have sites in multiple timezones).
I hope that helps.
Regards,
Luke
Luke Stevens
Research Data Systems Manager
Clinical Epidemiology & Biostatistics Unit (CEBU)
Murdoch Children's Research Institute
The Royal Children's Hospital, 50 Flemington Road
Parkville, Victoria 3052 Australia
T +61 3 9345 6552
E luke.s...@mcri.edu.au
W mcri.edu.au
From: 'Liz Johnson' via Redcap Open <redca...@googlegroups.com>
Sent: Tuesday, 22 July 2025 00:39
To: Redcap Open <redca...@googlegroups.com>
Subject: [REDCap Open] Creating patient 'blocks' to randomise in REDCap
CAUTION: External Email. Please be cautious with attachments and clicking links
I'd like to create a project at our institute which uses the randomization module. The treatment allocation is pretty straightforward of 1:1:1, but the doctor writing the protocol would like the participants to be allocated to blocks as well so that this translates to a larger trial. Currently no stratification by demographic or condition is required. Certain randomisation systems like Sealed Envelope can support random permuted blocks, but I'm struggling to see how to activate this, or how to import this as an option into the randomisation template you upload to REDCap. Does anyone have any ideas?
--
You received this message because you are subscribed to the Google Groups "Redcap Open" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
redcap_open...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/redcap_open/c961e0c0-af81-4fd9-8a71-6d028926ad83n%40googlegroups.com.
This e-mail and any attachments to it (the "Communication") are, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Murdoch Children’s Research Institute (MCRI) ABN 21 006 566 972 or any of its related entities. MCRI does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication.