Finally we're going to look at some advanced features in REDCap. First we'll check out the randomization module. This can be found under optional modules and customizations. To enable this, simply click on enable next to randomization module and the new box will appear, set up randomization module. I'm not going to go into a whole lot of detail about the randomization module. If you're using randomization in your project, we highly recommend that you talk with a statistician about whether REDCap is the appropriate place to do the randomization. You will also need to work with the statistician to develop your randomization tables within REDCap. For more details on the basics of how you set up your randomizations in REDCap, you can go to more details for a significant amount of information on the basics of how to set up randomization.

Next we'll take a look at the logging feature. The logging feature can be found under applications on the left-hand menu. The logging feature records every action that happens in your REDCap project, who performed the action, and when they performed it. You can filter by event types, so you can see when data's been exported; when design work has happened to your project; when users were added or deleted; and you can see information specific to specific records. It will also include all of the actual data that was entered into every field in REDCap. It's one way to come back and check the changes that have been made inside of a record, and it's an easy way to get the information so that you can reenter it if you happen to delete a record. You can also filter by each user in the project or by specific records. You can also look at things based on a specific time range.

Next I want to go into a little more detail about field comments. We talked a little bit about field comments way back when we discussed doing data entry in REDCap. To leave a comment on a specific field, you just click the quotation bubble next to it. This allows the person who is doing data entry to make a comment on the data that they've put in. It records the user and the date/time, and when it's saved you can see the little speech bubble has turned yellow. Anyone scrolling through this record would see that and know there's more information there. However as a general rule you don't have time to scroll through every form for every record. So you can also just go to the field comment log under applications. Here you'll see all the comments that have been made in the project. If you click on the comment you can see it and also respond to it. This is a great way for data enterers and project managers to communicate over specific pieces of data that may require additional clarification. It's especially helpful if the data enterers and the project manager aren't always working at the same time. You can filter based on a specific record, field, user, or look for a specific keyword.

Next we're going to look at the data import tool. This can be found under applications on the left-hand menu. The data import tool will allow you to import large amounts of data into your REDCap project. First you can see that I have a notice here that my project is still in development status. It's reminding me that I shouldn't put real data in until it's in production status--once you're in production there is a lot more protection for your data. If you want to import data into REDCap you'll have to do it through a CSV file. You can download an import template here. Simply click on download your import template with the records in rows--one record per line--or the records in columns--one record per column, and you will get a blank template that looks like this. Here you'll enter one record per row. If there's repeating instruments, you'll have to specify the instrument and instance and those will be additional rows. You can see at the top all of my variables are listed by variable name.

One set that I do want to pay extra attention to are these: other genre. If I look in the REDCap project I can see that the field other genre is a checkbox field. Checkbox fields work a little differently than multiple choice questions. In regular multiple choice questions, you'd simply have the code, the number before the comma, as the piece of data that you'd enter. In checkbox fields, where one record may have more than one answer choice selected, it's actually a series of yes/no questions. Each checkbox answer is a yes/no question; so instead of phrasing it as "I like genres one, two, three, and four," I ask "Do I like the genre one, action, 1, yes or 0, no." And then I move on to the next question. Do I like genre two, adventure? Yes or no. And so forth.

When you're importing data in REDCap, you have to use the actual variable names and the codes that you put in. So you can't have "What is your first name?" It has to be fname. You can't have "What is your date of birth?" It has to be dob listed as the variable names on the top. That is one of the reasons that it is easier to use the data template. You also have to use the coded answers. For genre, I couldn't type in action or adventure and expect REDCap to recognize it; I have to give the code 1 or 2. Additionally fields that have been validated--numbers, dates--have to contain the type of data that they've been validated with. I can't import text into a number field, for example. An easy way to see all the variable names, coding, and validation types in your project is to use the codebook. This can be found on the project home page under codebook. Here you have a list of all of your instruments, their official names, your variable names, the field label that goes with it, and then the field types with any validation or coding that goes with it. This is a great reference when you're trying to import data into REDCap.

Another important feature of importing data into REDCap is what happens if you already have some data in that field. Maybe you're adding additional data into that record, or maybe you're updating existing data. When you import data into REDCap, REDCap will give you a chance to review how you're changing your data before you make the import permanent, but something important to know is that by default blank values in your import file will not overwrite information that is in REDCap. So if I have a field in my REDCap file, age, and I already have the person's age in REDCap, I can import the variable age with my import file and just leave it blank, and it won't overwrite the age that is already saved in REDCap. The exception for this is if you choose to overwrite. Here on the file import page, you can choose to have blank values overwrite existing values. The default is to ignore blank values so that real data cannot be overwritten by accident. However, if you are specifically trying to overwrite values you can do it if you need to.

To import a file, you simply include the record information that you want to import and save it as a CSV file. Then go into REDCap and choose your file and upload the file to REDCap. Here you can review the data before you upload it. You can see where it's letting me know that I'm overwriting existing data, and it gives me both the current data in red and the new data in black. I can choose whether I'm okay with this change or not. If you try to import data that has an error in it--for example, your variable name has more than 26 characters, you'll get a warning that it's not a best practice. If you try to import data with a critical error, for example you try to import text into a number field, you'll get a list of all the fields that have an error that cannot be imported and exactly what the error is so that you can go back and fix it. When you're ready to upload, you simply hit import data.

Finally we're going to look at the data quality tool. This can be found under applications on the left-hand menu. The data quality tool is a great way to help ensure the integrity of your data. It comes preprogrammed with many different rules that you can check. For example, locating fields that are missing values, or maybe just specifically in required fields; looking for validation errors; outliers; multiple choice fields with invalid values or hidden fields that shouldn't have any values that do. One of the most valuable of the data quality rules is rule H, looking for incorrect values in calculated fields. If you recall, the calculations in calculated fields aren't actually sent to the server until you hit save. So if you update a calculation, it won't necessarily update the values for your entire project. Or you may import data into a calculated field that's incorrect. So you can check your project, and it will let you know if there are any discrepancies. If there are, when you click view you'll be able to correct the values in all calculated fields with a single click.

You can also add personal data quality rules. For example, if all the participants in your project are supposed to be of age, you might want to look for people under the age of 18. To add your rule you just give it a name and then describe what the rule should involve. If you have any trouble working out your rule logic, there's a link here on how to use the special functions. It will also tell you if your logic is valid or not for your project. You can also choose if you want this rule to exercise in real time. If it does, you'll get a notification if you enter data that violates your rule. Then you just click add, and here when I execute it I can see that I have nine records where the participant is below the age of 18.

That completes our REDCap tutorial. Next in the tutorial process is a short quiz on how to use REDCap.