Can I make a field dependent on multiple fields in EDC/CDMS?
When creating or editing a field, it is possible to make it dependent on only one field. However, using hidden calculation fields, you can also create dependencies on multiple fields.
For example, I want my Field_4 to be dependent on both Field_1 and Field_2 being answered with "Yes". In this case, my fields 1 and 2 are radiobutton fields, with options "Yes" (option value 1) and "No" (option value 0). I create a calculation field (Field_3) between Field_2 and Field_4 and I will select the option to hide it (because I don't want it to be visible in my participants); it will only be executed in the background. This is the calculation template:
if ({Field_1} == 1 && {Field_2} == 1) {
1;
} else {
0;
};
This means that if fields 1 and 2 are answered with yes (=1), this calculation will return a 1, if not it will return a 0.
You can add as many fields as you want in your if clause and you can also change the && (meaning AND; dependency on both values) to || (meaning OR; dependency on either value).
You can also check for multiple values of the same variable. For example, if you want to make Field_4 to be dependent on Field_1 being answered with "Yes" or "Maybe", then I will create the same calculation field as above, only using a slightly different template:
if ({Field_1} == 1 || {Field_1} == 2) {
1;
} else {
0;
};
Then, I will make my Field_4 dependent on this calculation field, Field_3, being equal to 1.
In the example below, the field 'Antihypertension medication administered?' will only be shown if systolic blood pressure is greater than 180 (>180) AND (&&) diastolic blood pressure is greater than 110 (>110).
Here is the calculation template which is used to check for the blood pressure values:

A dependency on the calculation is then set in the ‘Dependencies’ tab of the Antihypertension medication administered?' field:

The structure in the ‘Study forms’ tab will look as shown on the screenshot below:

In the data entry view, the field ‘Antihypertension medication administered?’ will only be showed if both blood pressure fields exceed values specified in the calculation template:
