0

check boxes for studies that completed imaging and date fields for mri imaging dates

TLDR; I want redcap to default the study checkboxes based on if the respective MRI date is not blank

Basically I have a set up like this. The first column (the check boxes) are studies that have completed MRI imaging. The second and third columns are date fields capturing the date of MRI imaging. I have cross project piping set up that automatically pipes in the dates of the MRI imaging from the respective study redcaps. What I would like to do is have some kind of conditional logic that looks accross the date fields and if they are not blank defaults the check boxes that need to be marked off as completed. I hope that makes sense.

I've had success with getting it to do it for one study with action tags, like @IF([study2_mri1_date]<>'', @SETVALUE='2', ''). But I am not sure exactly how to do this for all of the studies. I had the thought to nest multiple ifs in each other but I would also have to come up with all the possible combinations of completed studies which seems like doing too much. I'm sure there's a better way which is why I've come here. Does anyone have ideas of the best way to approach this?

1 Answers1

0

As you've noticed, the @IFs aren't cumulative so you need to nest them, which means accounting for every possibility in the logic. There are 2^5=32 possible combinations of ticked/not ticked for five checkboxes. Not feasible.

You could do it with five separate checkbox fields each with a single choice, and hence five independent @IFs, and embedded to look like they're one field, but I'd ask why you need the checkboxes at all? What do they give you that you can't get from just looking at the dates? Having the data in two places (date field and cb) may also lead to discrepancies where a user removes or adds a tick or a date value manually.