Using Automation Engine to show or hide a form based on a randomization value in EDC/CDMS
In this tutorial you will learn how to hide or show a form based on the randomization of a participant using the Automation Engine. Before creating an automation which will trigger the action of hiding a form, make sure the Automation Engine is enabled and all the Randomization settings are correct.
Parameters
Event: The subject is randomized to group 1 (treatment).
Action: Hide a form.
1. In your study, create a randomization field with the variable name 'rand_outcome':
2. Create a calculation field that has variable name 'rand_calc' and uses the template {rand_outcome}:
The outcome of this calculation will be a number. In my study, there are two groups and the outcome of the randomization will be either 1 or 2 (this generally works on the order in which you entered the randomization groups in the randomization settings). This value will be used as a condition for the automations. Here is an example of the randomization settings:
3. Turn Automation Engine on within your Study under Study Settings by enabling beta features (if this is not turned on, you will get a warning later on in the Automation Engine). Once they are enabled, you will see tab 'Automations' appear in the Study Settings. Go to the Automations tab and click on 'Add Automation'.
4. A new window will open where you can create your automation. Name your automation.
5. To set up an automation, press 'Add event' button' and choose 'Study Field Value Updated' as a trigger event
Select the calculation field which contains the template to extract randomization outcome:
6. To be able to hide form based on the group the subject is randomized to, click on 'Add condition'. In the pop-up window, select 'Study Field Value' and click 'Next':
The automation will only run if the selected condition is true when the event occurs.
7. After clicking the 'Next' button, you will need to click 'Select Variable' and choose the same calculation field that extracts the randomization outcome. You will then need to define a condition that will trigger the automation engine. In the example below, the automation will be triggered when the subject is randomized to the 2 group. In this case, the calculation field will have a result '2'. In this case, the condition will be as follows:
Click 'Save' to save the condition. Your automation will look as follows:
8. The next step is to select action to be triggered by clicking '+ACTION'. Choose 'Show/hide form' and select a form that needs to be hidden for the subjects randomized to group 2. In the present study, the form 'Group A' will be hidden for all participants randomized into Group B (group 2):
After the form is selected, click 'Select' and then 'Save'.
9. The Automation Engine is set up now, click the green button 'Save' to save the automation engine settings:
10. After the participant is randomized, it is necessary to open the form that contains the calculation field. The randomization group will be visible in this calculation field and trigger the automation.
Here the subject hasn't been randomized yet and the automation is not triggered, thus both forms ‘Group A’ and ‘Group B’ are visible:
In the participant below, the subject is randomized to group 2 and the form ‘Group A’ is hidden now: