Important Project Development Concepts
Variable
- In REDCap, all fields on data collection instruments will have a corresponding ‘field name’ or ‘variable name’ that is unique to it. A field’s variable name can be defined in the Online Designer or in the Data Dictionary when adding/modifying a field in the project.
- Variable name can only contain alphabets in all lowercase, numbers and underscores.
- The variable name can be utilized in various places and functionality in REDCap, such as in conditional logic, calculations, and piping. REDCap variable names are referenced by placing square brackets [ ] around it – e.g., [variable_name]. And if the project is longitudinal, in certain contexts you may need to additionally provide the unique event name, which must also be in brackets and prepended to the variable name, in order to target that field on a particular event – e.g., [event_2_arm_1][variable_name]. The usage of variable names inside brackets is often referred to as REDCap Field Notation.
Renaming Variable
- Renaming a variable that has existing data will also remove those existing data.
- It is important to move a project to production status once data collection starts so that any variable with existing data that is being renamed will go through review under ‘Draft mode’ within Online Designer.
Reassigning an Instrument to a different Event
- Reassigning an instrument that has existing data to a different event will also remove those data for the instrument from the previous event. Note that the instrument in the new event will not have any existing data.
Making changes to instruments, renaming records or deleting record/instrument data
- If project is in development status, you should always download the data dictionary before making any changes to instruments as the revision history will only save your changes after moving the project to production.
- If real data is being collected, you should always export a copy of the existing data before making any instrument changes, renaming records or deleting record/instrument data. This will enable you to recover data quickly should any issue arise from the change.
Changes not making it’s way to the project in production status
- When changes do not show up in the project, check to make sure that any changes in Draft Mode have been submitted for review.
- Changes will not show if either changes in Draft Mode have Not been submitted for review or the review has not been approved.
Longitudinal Project
- When referencing variables in a longitudinal project, always include the [redcap_event_name] before the variable name or else the logic may not evaluate correctly.
Radio button and Checkbox field differences
Variable [fruit] with the following choices
3, pears
1, apples
2, oranges
4, others
Above example set up as radio button field
- In conditional evaluations, radio button field is referenced by [fruit] = ‘3’ if you want to evaluate if pears is being chosen.
- When exporting data, radio button field is referenced by fruit column fruit with values representing the values chosen.
- The value list does not need to be in ascending or descending order.
Above example set up as checkbox field
- In conditional evaluations, checkbox field is referenced by [fruit(3)] = ‘1’ if you want to evaluate if pears is being chosen.
- When exporting data, checkbox field is referenced by fruit choice columns fruit__1, fruit__2, fruit__3, fruit__4 with values of 1 or 0 where 1=checked and 0=unchecked.
- The value list does not need to be in ascending or descending order.