Click on the magnifying glass to the right. Starting typing a topic you wish to learn about
Prepare your EHR data for REDCap Import
Definitions:
EHR: Electronic Health Record
EDW: Electronic Data Warehouse
CCTS: Center for Clinical and Translational Sciences
MRN: Medical Record Number
Initial Considerations
Currently, the University of Utah does not have a direct communication between Epic and REDCap.
If your team would like to include EHR data in your REDCap project, you’ll need to either manually transcribe the data or request EHR data from the Electronic Data Warehouse (EDW) then prepare it for REDCap import.
EDW requests can be completed in connection with your CCTS registration. All REDCap projects are required to have a CCTS ID at the University of Utah. If you do not currently have one, you can request one here ProTrackS which also includes the opportunity to request EDW services. If you already have a CCTS ID you can reach out to our team to send you the EDW service request form helpdesk@ccts.utah.edu.
The Process
Once you have your EHR data, follow these steps to prepare it for REDCap import.
Assure the variables you plan to import from the EHR exist in your REDCap project.
If your EHR variables do not exist as REDCap fields, navigate to the REDCap project left menu > designer > enter draft mode > create the fields in the desired instrument(s) > submit changes for approval
Confirm the variables are coded the same in the EHR dataset and your REDCap project. If not, be prepared to re-code the EHR data before import. You can check your REDCap coding scheme by navigating to the REDCap project left menu > codebook > find the variable and review the code
Open your EHR data in excel
Assure the data is oriented such that the first row is variable names, then each subsequent row is a record/participant
The first column will need to be the [record_id] of existing (or new) records in your REDCap project
Cell A1 should have the following text: record_id
Cell A2-# should have the record_id values
If you use MRN to match EHR data to REDCap records, follow these steps:
REDCap project left menu > data exports > custom selection > select the instrument that contains the MRN field > export data > export raw data as .csv file > open in Excel
Manually match your data, or use a VLOOKUP Excel function or INDEX & MATCH Excel functions
Save your EHR data as a .csv file
Navigate to the REDCap project left menu > data import > select the EHR data csv file > import
Special Considerations
Re-coding data
Many instances of transferring data from the EHR to REDCap will require you to re-code data. For example, you may download sex from the EHR as string values (male vs. female), whereas in REDCap your [sex] field is coded as a radio button 1 male vs. 2 female. You’d need to replace all “female” text with “2” in the “sex” column of your EHR data in excel, and subsequently replace all “male” text with “1” in this column.
Missing data
If some records are missing data for fields that need to be imported, leave their cell blank.
Longitudinal projects
If you have EHR data that only represents one event…
The 1st row of your EHR data should still be variable names
The 1st column of your EHR data should still be: record_id
cells A2-# should be the values for record_id’s
The 2nd column of your EHR data should be: redcap_event_name
cells B2-# should be the name of your event
you can find the name of your event by navigating to REDCap left menu > project setup > define my events > far right column of the event table
Columns 3-# should be your data variables
If you have EHR data that represents more than one event…
Your data will need to be oriented so that the columns are the variables, and each row represents 1 record/participant at 1 event
If your EHR data is originally formatted such that each row is 1 record/participant at all events, and the columns are each variable at each event, you’ll want to consider splitting the events into separate sheets on your EHR excel data sheet, naming the variables according to the REDCap field names (removing any event descriptor from the variable name), and adding a column for [redcap_event_name] to each sheet to perform separate imports of each event’s data
The 1st column of your EHR data should still be: record_id
cells A2-# should be the values for record_id’s
The 2nd column of your EHR data should be: redcap_event_name
cells B2-# should be the name of your event
The data can be organized either by [record_id] or by [redcap_event_name], this will not affect your import. Either of these examples is correct orientation of the data:
Repeating Instruments
If you are importing data from the EHR for a repeating instrument, the formatting is similar to longitudinal imports.
Your data will need to be oriented so that the columns are the variables, and each row represents 1 record/participant at 1 repeat instance
If your EHR data is originally formatted such that each row is 1 record/participant at all instances, and the columns are each variable at each instance, you’ll want to consider splitting the instances into separate sheets on your EHR excel data sheet, naming the variables according to the REDCap field names (removing any instance descriptor from the variable name), and adding columns for [redcap_repeat_instrument] and [redcap_repeat_instance] to each sheet to perform separate imports of each instance’s data
The 1st column of your EHR data should still be: record_id
cells A2-# should be the values for record_id’s
The 2nd column of your EHR data should be: redcap_repeat_instrument
cells B2-# should be the name of your instrument
you can find the name of your instrument by navigating to the REDCap left menu > designer > in the list of instruments your instrument’s name is lowercase instrument title with _ for spaces
if the instrument is Numeric Pain Rating Scale, you’d label this as follows in excel: numeric_pain_rating_scale
The 3rd column of your EHR data should be: redcap_repeat_instance
cells C2-# should be the instance number, starting at 1
note, you may have 5 instances of an instrument for 1 record but only 3 instances for a different records; this is okay
Here is an example of formatting for repeat instruments: