Example Data Quality Rules

Example Data Quality Rules

We use REDCap’s data quality rules to check key variables within a study. Typically these variables relate to outcomes (including safety data and anything on which the outcome measures are dependent), sequences of study events (for example randomization should be after consent), and any other potential protocol deviations.

These examples are taken from a complex pediatrics study. The rule logic is included in order to show their complexity and is simply provided as an example. The same logic can only be used within the same study context.

The rules are numbered so that they can be referred to easily in queries, the data management plan, etc.

1. Checking significant time sequences.

Rule Description: SDA02 Time of study drug administration is before informed consent was provided.

Rule Logic: [con_consentdt] <> "" and [sda_osd1dt] <> "" and datediff([con_consentdt],[sda_osd1dt],"d",true) < 0

Rule Description: SDA10 Study drug #2 is less than 15 minutes after study drug #1

Rule Logic: [sda_isd1startdt]<>"" and [sda_isd2startdt]<>"" and datediff([sda_isd1startdt],[sda_isd2startdt],"m",true) < 15

Rule Description: AE14 Start date of AE may be before date of triage (check).

Rule Logic: rounddown(datediff([ae_startd], [ed_1_screening_arm_1][scr_triagedt], "d",true) )> 0

2. Checking eligibility criteria

Rule Description: ELIG03 Inclusion 2 is "yes" but patient age is not between 60 days and 365 days (12 months).

Rule Logic: [elig_incl2]=1 and ([scr_age]<60 or [scr_age]>365)

3. Checking for forms that may have been missed.

Rule Description: SE01 It is more than a week since the participant was consented but the Side Effects form has not yet been completed.

Rule Logic:  [ed_2_enrollment__t_arm_1][con_consent]=1 and [side_effects_complete] = 0  and datediff( [ed_2_enrollment__t_arm_1][con_consentdt], "today","d",true) > 7

4. Explicit checks for missing data

Rule Description: ADM06 Patient was admitted but discharge date has not been entered.

Rule Logic: ([adm_pa]=1 or [adm_sa]=1) and [adm_dischdunk(1)]=0 and [adm_dischd]=''