Data Validation
Validation prevents invalid data from being entered. Examples:
| Variable | Validation |
| Age | 0–120 |
| Weight | 1–200 kg |
| Temperature | 30–45 °C |
| Date | YYYY-MM-DD |
Benefits include:
- Reduced cleaning effort
- Improved accuracy
- Better compliance
Validation should be implemented whenever possible rather than relying on later cleaning.
Branching Logic
Branching Logic displays fields only when relevant. Example: Question: “Has participant ever been pregnant?” If No: Hide pregnancy questions. If Yes: Show pregnancy history section. 4 Example syntax: [pregnant_history] = ‘1’ This means the associated field appears only when pregnancy history equals Yes. Branching logic improves:
- User experience
- Data quality
- Form completion speed
Calculated Fields
Calculated fields derive values automatically. Examples:
Body Mass Index
([weight_kg])/(([height_cm]/100)^2)
Age at Enrollment
datediff([dob],[enrollment_date],”y”)
Although REDCap can calculate values during entry, important derived variables should still be reproduced during statistical analysis to ensure reproducibility.
Longitudinal Design
Many clinical studies collect repeated observations.
Example:
|
Event |
Day |
|
Screening |
-7 |
|
Enrollment |
0 |
|
Day 7 |
7 |
|
Day 28 |
28 |
|
Day 90 |
90 |
REDCap allows:
- Event creation
- Instrument-event mapping
- Scheduling
- Repeat measurements
Longitudinal functionality must be enabled in project settings before events can be configured.
Repeating Instruments
Repeating instruments are useful when the number of observations is unknown.
Examples:
Adverse Events
One participant may have:
- Zero events
- One event
- Twenty events
Medications
Participants may receive multiple drugs.
Laboratory Samples
Multiple specimens collected at different times.
Repeating instruments avoid creation of large numbers of unnecessary variables