ADMISSION_TRIAL_GROUP_SET()
ADMISSION_TRIAL_GROUP_SET(trial_group, [stratification_variable]) |
Introduced in API Version 2.7.22
Assigns a Trial Group to the Admission
The ADMISSION affected is always the one in the execution context of the FORMULA.
This formula allows to assign the ADMISSION to the “Intervention” or “Control” group in a PROGRAM configured as “TRIAL”.
This formula only has effect if:
The PROGRAMs configured as “TRIAL”
The ADMISSION is currently in stage “ENROLL”
Otherwise the execution of the formula will do nothing.
Input Parameters
Parameter | Type | Default | Required | Description |
---|---|---|---|---|
|
| Yes | One of the following options:
| |
|
| No | This parameter is only used when The value must be an ITEM_CODE of any of the ITEMS in any TASK of the ADMISSION. The randomization algorithm will search for the value of this ITEM_CODE in all existing ADMISSIONs of the SUBSCRIPTION and find out how many ADMISSIONs with the same value are assigned to each Trial Group. The goal is to adapt the randomization calculation probabilities so that the ADMISSION with the same value for the stratification variable are balanced between each trial group. |
Return value
If the execution is successful, the FORMULA returns the Trial Group assigned to the ADMISSION (”I” or “C”).
Otherwise the function returns NULL
Execution
When the FORM containing the FORMULA is closed
Examples
Formula | Description |
---|---|
ADMISSION_TRIAL_GROUP_SET(“INTERVENTION”) | Assign the ADMISSION to the “Intervention” Trial Group. |
ADMISSION_TRIAL_GROUP_SET(“RANDOM“) | Calculate randomly the Trial Group. No stratification variable has been provided, so the algorithm will generate a random Trial Group trying to keep the balance between the number of ADMISSIONs in Intervention and Control groups. |
ADMISSION_TRIAL_GROUP_SET(“RANDOM“, “default”) | Calculate randomly the Trial Group using as stratification variable the one configured in the PROGRAM (if any). |
Automatic randomization
When this formula is executed with trial_group
= "RANDOM", the system will calculate randomly the Trial Group, but always trying to keep the 2 groups as balanced as possible.
The Trial Group is calculated using a probabilistic algorithm that assigns a higher weight to the less populated group. This way, the group less populated is more likely to be chosen as the Trial Group.
The algorithm to decide automatically which trial group should be assigned could be based in a random choice between “Intervention” or “Control” with 50% of probability. Nevertheless, when the total number of ADMISSIONS in the SUBSCRIPTION is small it is easy to end up with a highly unbalanced distribution.
For this reason the algorithm used to calculate the Trial Group modifies the probabilities of each group depending on the current balance of ADMISSIONs (i.e. the group with less ADMISSION will have a higher probability to be assigned to the ADMISSION)
Stratification variable
Sometimes we want to balance the ADMISSIONs in each trial group depending on certain variable of the ADMISSION.
For example consider a TRIAL PROGRAM about “Kidney rehabilitation” to test the efficacy of a drug, but the patients are currently under different hemodialysis treatments. We would like to distribute the patients randomly in the “Intervention” and “Control” groups, but also trying to ensure that patients under a certain hemodialysis treatment are balanced between the groups.
Otherwise it could happen that we end up with an “Interverntion” group with the same number of patients than the “Control” group, but where all the patients under certain treatment are concentrated in the same group. This would lead to a biased result of the study.
The purpose of the the parameter stratification_variable
is to allow to define a variable so that the ADMISSIONs of the same value for the stratification variable can be balanced across the trial groups.