REDWrap is a free utility for converting REDCap data exports to a normalized relational data format. It runs in Microsoft Access and converts the flat-file REDCap export into Access tables, created with a more logical (normalized) structure.
It’s available in version 1.11. Download here.
- Since REDWrap uses Microsoft Access, it can only be run from a Windows machine. (It could be a Windows Remote Desktop accessed by a Mac, or a Mac running a Windows emulator.)
- An up-to-date version of Microsoft Access must be installed on the machine you’re using to run REDWrap.
How to use REDWrap
- Log in to your REDCap project. Export data (choose the “CSV / Microsoft Excel (raw data)” option) and export the data dictionary to your selected Windows machine.
- Download REDWrap to your selected Windows machine, using the link above, and unzip.
- Open REDWrap. When prompted, select the exported data file and dictionary file.
- REDWrap will create a set of Access tables holding your REDCap data. In addition, it will create “admin” tables (_arm, _event and _lookups); these don’t hold data but rather metadata, or information about the structure of your project. Of course REDWrap will not make any changes to your downloaded data, let alone your REDCap project.
- If you’re handy with the “Relationships” diagram feature of MS Access, you can see that REDWrap has set up appropriate relationships between the new data tables.
REDWrap offers two independent options for how it converts and normalizes your REDCap data. If you’re new to REDWrap, best bet is to leave both selected, then experiment with other configurations as needed. In case you want the details of these options:
- Instruments that can be used only once per primary record are normalized to the primary table. Unless you use REDCap’s more advanced features (longitudinal data collection, repeating instruments and events), a REDCap instrument can be entered no more than ONCE per subject. If you leave this option selected, REDWrap will collect all such instruments to a single Access table (to be called “subject” or whatever you choose for your primary table). If you don’t select it, REDWap will set up such instruments as separate tables, with a one-to-one relationship to the subject.
- Multiple instruments that are specific to a repeating event are normalized to an event-specific table. In REDCap, I might create instruments X, Y and Z, which are assigned to a single repeating event A, but not to any other events. Since a repeating event repeats all the instruments assigned to it, I could have combined all three instruments X, Y and Z into a single instrument (call it XYZ). I probably left the three separate just for convenience of data entry. But for data analysis it might make more sense to have them combined. If you leave this option selected, REDWrap will combine such instruments into a single table which is named according to the event, not the instrument.
Note that if you deselect both options, REDWrap will make one table for every instrument in the REDCap project. All of those tables will be linked (whether one-to-one or one-to-many) to the primary table.
Tips on using REDWrap
- Don’t download PHI from your REDCap project to an insecure environment. (This is always true, whether or not you’re using REDWrap.)
- Be sure you’ve entered data to your REDCap project before exporting. REDWrap won’t recognize all the structures of your project unless you’ve entered data to all the instrument you’ve created, in all the events and arms to which you’ve assigned them.
- The data exports should be exactly as exported from REDCap. In particular, if you open the data export file in Excel (just to have a peek) and then close and save the file, Excel will change the data in ways that may break the REDWrap conversion.
- You can use REDWrap multiple times to convert/normalize multiple REDCap projects. Be aware that each new conversion will delete the converted data from the previous project. If you want to keep multiple conversions, just make multiple copies of REDWrap.
Known bugs and limitations (to be addressed in upcoming versions)
- The REDCap primary field (first field in first instrument) will appear as a text field in the converted data, even if your entries were strictly numeric.
Please post them here: www.quicksilverconsulting.com/redwrap-questions-and-comments/