an overview of redcap, a secure web-based application for ... · electronic data capture (edc)...

14
Page 1 of 14 PharmaSUG 2014 - Paper PO19 An Overview of REDCap, a secure web-based application for Electronic Data Capture Kevin Viel; inVentiv Health Clinical and Histonis, Incorporated; Atlanta, GA ABSTRACT REDCap© (Research Electronic Data Capture) is a secure web application for building and managing online surveys and databases. With the simplest use, REDCap automates the interactions with the SAS System, providing an option to manually download files, including SAS code to create a SAS dataset and format library. Involvement of the SAS System ® in order of increasing sophistication includes using SAS to write the “data dictionary” or template for the electronic forms, using an API to access the projects, or to read the MySQL databases directly. This paper provides a very brief introduction to REDCap and a superficial overview of the using SAS System with REDCap. INTRODUCTION Electronic Data Capture (EDC) expands the ability of researchers to use questionnaires and surveys, while improving the integrity and completeness of the responses and eliminating replicate manual data entry. The REDCap Consortium provides a secure, web-based EDC application (REDCap 1 ) hosted by the partner institutes and organizations that supports EDC for research studies by providing: 1) an intuitive interface for validated data entry; 2) audit trails for tracking data manipulation and export procedures; 3) automated export procedures for seamless data downloads to common statistical packages; and 4) procedures for importing data from external sources. Importantly, under certain standard operating procedures (SOP), REDCap can be (FDA) 21 CFR Part 11 2 compliant. The REDCap website (www.project-redcap.org) offers (extensive) libraries including templates, suggested language for IRB protocol applications, and video tutorials. The list serve and Consortium Wiki has generally been extremely helpful. Importantly, if one’s organization qualifies as an “institutional partner”, the software and support are available at no-charge. REDCap requires, at a minimum, a Web server with PHP, a MySQL database server and a SMTP email server. From absolute scratch, a very modest institutional partner should not be unduly tasked with obtaining and executing the agreement forms (contracts), submitting them to the REDCap consortium for approval, registering a web domain, obtaining a SSL certificate, downloading and installing the software. Having an experienced IT person, as the author did, obviously makes the process easier. Once the software is correctly installed, an intuitive SAS programmer could probably navigate as the administrator to create a project and bring it to the production state. For the less brave or for those with less time to experiment, following the videos provided by the website is another route. This paper will also briefly describe the process, but it is not intended to be authoritative or current; the reader should consider what follows as guidance only. CREATING A REDCap PROJECT Upon logging onto an account with administrative privileges, this REDCap user will select the "Create New Project" tab (Figure 1). After entering details such as "Project title", the user will click the "Create Project" button. Further project details can then be edited or created (Figure 2). To explore REDCap, select the "Online Designer" button under "Design your data collection instruments". The collection of instruments (forms or questionnaires, for instance) of the project are displayed. Since this is our first project and we did not copy it, the default "My First Instrument" is the only instrument available. For this introduction, we will not rename it. Clicking the instrument brings us to the fields of the instrument. The only field available is the required primary key of the table, given the default name "Record ID". By clicking the Pencil icon in the variable field (Figure 3a), one can edit the field (Figure 3b). Instead, we will click Add Field to obtain a list of possible choices (Figure 3c). We have select Multiple Choice – Drop-down List (Single Answer) and provide the Variable Name, a Field Lable, and the Choices (Figure 4b). We create another variable, Issue, as Text Box (Short Answer). After clicking Save (not shown), the screen returns to the fields of the instrument. Clicking the branching logic icon allows us to employ conditional logic, namely show this field in the online form only if the person answering the questionnaire answered None to the question Learn. Finally, we add a variable Date. The field type, however, is again Text Box (Short Answer). To distinguish the field as a date field, we select the Date(Y-M-D) in the Validation? pull-down list (Figure 5).

Upload: vudan

Post on 18-May-2019

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1 of 14

PharmaSUG 2014 - Paper PO19

An Overview of REDCap, a secure web-based application for Electronic Data

Capture

Kevin Viel; inVentiv Health Clinical and Histonis, Incorporated; Atlanta, GA

ABSTRACT

REDCap© (Research Electronic Data Capture) is a secure web application for building and managing online surveys and databases. With the simplest use, REDCap automates the interactions with the SAS System, providing an option to manually download files, including SAS code to create a SAS dataset and format library. Involvement of the SAS System

® in order of increasing sophistication includes using SAS to write the “data dictionary” or template for

the electronic forms, using an API to access the projects, or to read the MySQL databases directly. This paper provides a very brief introduction to REDCap and a superficial overview of the using SAS System with REDCap.

INTRODUCTION

Electronic Data Capture (EDC) expands the ability of researchers to use questionnaires and surveys, while improving the integrity and completeness of the responses and eliminating replicate manual data entry. The REDCap Consortium provides a secure, web-based EDC application (REDCap

1) hosted by the partner institutes and

organizations that supports EDC for research studies by providing: 1) an intuitive interface for validated data entry; 2) audit trails for tracking data manipulation and export procedures; 3) automated export procedures for seamless data downloads to common statistical packages; and 4) procedures for importing data from external sources. Importantly, under certain standard operating procedures (SOP), REDCap can be (FDA) 21 CFR Part 11

2 compliant. The

REDCap website (www.project-redcap.org) offers (extensive) libraries including templates, suggested language for IRB protocol applications, and video tutorials. The list serve and Consortium Wiki has generally been extremely helpful. Importantly, if one’s organization qualifies as an “institutional partner”, the software and support are available at no-charge.

REDCap requires, at a minimum, a Web server with PHP, a MySQL database server and a SMTP email server. From absolute scratch, a very modest institutional partner should not be unduly tasked with obtaining and executing the agreement forms (contracts), submitting them to the REDCap consortium for approval, registering a web domain, obtaining a SSL certificate, downloading and installing the software. Having an experienced IT person, as the author did, obviously makes the process easier. Once the software is correctly installed, an intuitive SAS programmer could probably navigate as the administrator to create a project and bring it to the production state. For the less brave or for those with less time to experiment, following the videos provided by the website is another route. This paper will also briefly describe the process, but it is not intended to be authoritative or current; the reader should consider what follows as guidance only.

CREATING A REDCap PROJECT

Upon logging onto an account with administrative privileges, this REDCap user will select the "Create New Project" tab (Figure 1). After entering details such as "Project title", the user will click the "Create Project" button. Further project details can then be edited or created (Figure 2). To explore REDCap, select the "Online Designer" button under "Design your data collection instruments". The collection of instruments (forms or questionnaires, for instance) of the project are displayed. Since this is our first project and we did not copy it, the default "My First Instrument" is the only instrument available. For this introduction, we will not rename it. Clicking the instrument brings us to the fields of the instrument. The only field available is the required primary key of the table, given the default name "Record ID". By clicking the Pencil icon in the variable field (Figure 3a), one can edit the field (Figure 3b). Instead, we will click Add Field to obtain a list of possible choices (Figure 3c).

We have select Multiple Choice – Drop-down List (Single Answer) and provide the Variable Name, a Field Lable, and the Choices (Figure 4b). We create another variable, Issue, as Text Box (Short Answer). After clicking

Save (not shown), the screen returns to the fields of the instrument. Clicking the branching logic icon allows us to employ conditional logic, namely show this field in the online form only if the person answering the questionnaire answered None to the question Learn. Finally, we add a variable Date. The field type, however, is again Text Box (Short Answer). To distinguish the field as a date field, we select the Date(Y-M-D) in the Validation? pull-down list (Figure 5).

Page 2 of 14

At this point, the design is complete for our purposes. One can access the form by either clicking on "My Projects" or "My First Instrument" in the left column. The latter accesses the form directly (Figure 6). Note that the author entered a 1 in the field "Enter a new or existing Record ID". Hitting Enter or Tab will bring the user to questionnaire screen (Figure 7a). The question Issue is not displayed (Figure 7a) unless Learn is None (Figure 7b). A warning about REDCap is pertinent. If one enters (extensive) data into variables that are subject to branching and then change the value of the variable upon which branching depends, then REDCap may set to missing the values of those variables subject to branching. It does so only after a warning. If the user employs the practice of frequently saving by clicking the "Save and Continue" button at the bottom of the screen, then the value will be subject to the audit trail available by clicking the H button to the top left of the field entry (Figure 8). Note that the value in the field is "A Great Amount" but is not among the Data History of the field. The author did not save this value. Also note that the Issue field is not displayed. To see it, and thus to click its H button, the user would have to supply the answer None to the Learn field. Other ways to view the audit trail exists.

By returning to the Project Home (Figure 9), the user can access tasks and reports for the project. Of great interest to the SAS programmer who may employ REDCap or work with a REDCap user is the Quick link: Download the current Data Dictionary.

DATA DICTIONARY

The “Data Dictionary” is a CSV file defining a table with 17 columns (Table 1). This template defines the variables, the branching, and special appearances. Not unusually, questionnaires can extend many pages spanning hundreds if not thousands of questions and items. Even with a manageable number of variables, a typical SAS programmer would probably prefer a more automated way to create the data dictionaries. If, as expected, the list of variables and their descriptions are available electronically, then one can use the SAS System to write the CSV file that creates the various questionnaires and the questions they contain. The SAS code in CODE 1 suggests such an alternative.

TABLE 1. “Data Dictionary” CSV file header

Column Name

1 Variable / Field Name

2 Form Name

3 Section Header

4 Field Type

5 Field Label

6 Choices, Calculations, OR Slider Labels

7 Field Note

8 Text Validation Type OR Show Slider Number

9 Text Validation Min

10 Text Validation Max

11 Identifier?

12 Branching Logic (Show field only if...)

13 Required Field?

14 Custom Alignment

15 Question Number (surveys only)

16 Matrix Group Name

17 Matrix Ranking?

Page 3 of 14

CUSTOMIZING THE FORMS REDCap does an excellent job of rendering a readable questionnaire. Providing some Validation such as ranges or even formats will help control both the data entry and quality. The possibilities are extensive, but a few examples follow:

Text Validation Type OR Show Slider Number: date_mdy

Section Header: <font size = "3" color = "blue">Coagulation Data</font>

Choices, Calculations, OR Slider Labels: 0 | 1 , 1-5 | 2 , 6-10 | 3 , 11-50 | 4 , 50-150 | 5 , > 150

1 , Yes | 0 , No | 2 , don't know

1 | 2 | 3 | 4, 4 or more

With regard to the Choices, the ability to generate a long or complicated list programmatically is helpful. The use of text labels for the coded values translates to a FORMAT in the SAS System, which is discussed briefly in the Export section. Once the REDCap updates the data dictionary or creates new one, then he or she may upload the data dictionary (Figure 10).

ACCESSING DATA DATABASE STRUCTURE For the most part, the structure of the database matters little to the SAS programmer. Nonetheless, the structure of the database might be unusual to the SAS programmer with little to no experience with other databases. The projects of REDCap are kept within on MySQL database the relational tables of which follow the Entity–Attribute–Value model (EAV) model. This model is common in the medical record field and may have efficiencies with sparse data

3. In short, do not expect to find a tabular format (rows/columns or, in the SAS system, observations/variables).

API

REDCap provides both an API (Application Programming Interface) and video demonstrating its use. Worley and Yang

4 have written an accessible paper about using the API with SAS. Finally, the REDCap List serve is

an excellent resource. The API Token generated restricts access to only the project for which the administrator created it requiring the user to have access to that project (FIGURE 11).

ODBC In the Microsoft Windows operating system, one can create an ODBC Data Source Name [DSN: Control Panel > System and Security > Administrative Tools > Data Sources (ODBC)] that can then be used in a LIBNAME statement (suggested): Libname MySQL

ODBC

Datasrc = MySQL_3_51

User = &MySQL_User.

PWD = &MySQL_PWD.

Schema = psug_test

;

Coordination with the MySQL database and web-site administrator may be necessary, for instance to allow communication via a certain port and, potential, by restricted (static) IP addresses. When accessing the data in via ODBC, the database structure (EAV) will not only be obvious, but an understanding of it will be necessary to create a SAS datasets. The author, at this time, offers no opinion concerning efficacy or security, other than to note that it appeared to him that permission to certain projects may have been circumvented; the ODBC method of access might be best restricted to only those individual who have access to the entire database, not just certain projects. For instance, those who should be blinded to certain data or do not have (HIPAA) approval to certain data should perhaps not use this data access method.

Page 4 of 14

EXPORT REDCap will export (Figure 12) three files to create a SAS dataset and formats with the click of three buttons (Figure 13). The data are in CSV format with no header, in the simple example of this paper:

"1",1,"","2014-04-13",0

It also creates a .sas file (Code 2), although the formatting of the original file could be improved and has been slightly edited for presentation purposes here. A third .bat file is also available as a “driver”. Note that the output of these files is temporary datasets. The author does not use the .bat file, but rather edits the .sas file to create permanent SAS datasets and formats. Note that the code includes a FORMAT procedure (lines 39-44) and applies them as permanent formats. The SAS programmer will have create permanent dataset and library for formats.

CONCLUSION REDCap is a secure, web-based application that a SAS programmer should be able to use intuitively to build forms and export their data. The REDCap consortium lists an impressive number of partners, some of whom are using REDCap for clinical trials in a regulated environment (FDA, for instance). In the most basic use, REDCap provides a simple method to export the data from the forms of a project and to run a SAS program that REDCap generated to create temporary datasets and formats. As the number of download to export the data increases, a SAS programmer can choose between at least two different programmatic approaches to avoid the GUI: the API and ODBC methods. Finally, to further reduce the manual interaction with the GUI, a SAS programmer can use current data dictionaries to create a project template with multiple forms and questions (variables) that REDCap also refers to as a “data dictionary”.

ACKNOWLEGEMENTS This work was supported in part by the following grants: NIH-5RC2HL101851-02, NIH-5R01HL072533-04, and NIH-5K08HL071130-05. In addition, Greg and Rebecca Kaneb graciously supported this effort.

Contact Information Your comments and questions are valued and encouraged. Contact the author at: Name: Kevin Viel Enterprise: inVentiv Health Clinical Histonis, Incorporated E-mail: [email protected], [email protected] Web: https://redcap.histonis.org/edc/ http://www.inventivhealthclinical.com/ SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. REDCap is a registered trademark of Vanderbilt University, Nashville, Tennessee Other brand and product names are trademarks of their respective companies.

REFERENCES 1 Paul A. Harris, Robert Taylor, Robert Thielke, Jonathon Payne, Nathaniel Gonzalez, Jose G. Conde, Research

electronic data capture (REDCap) - A metadata-driven methodology and workflow process for providing translational research informatics support, J Biomed Inform. 2009 Apr;42(2):377-81. 2 http://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfcfr/CFRSearch.cfm?CFRPart=11

3 Dinu, V. and P. Nadkarni (2007). "Guidelines for the effective use of entity-attribute-value modeling for biomedical

databases." Int J Med Inform 76(11-12): 769-779.

Page 5 of 14

4 Worley S and Yang D. SAS® and REDCap API: Efficient and Reproducible Data Import and Export. Proceedings of

MidWest SAS® Users Group. 2012

http://www.mwsug.org/proceedings/2013/RX/MWSUG-2013-RX02.pdf

Page 6 of 14

FIGURES (SCREEN CAPTURES)

Figure 1.

Figure 2.

Page 7 of 14

Figure 3b.

Figure 3a. Figure 3c.

Figure 4a. Figure 4b.

Page 8 of 14

Figure 5.

Figure 6.

Page 9 of 14

Figure 7a. Figure 7b.

Figure 8.

Page 10 of 14

Figure 9.

Figure 10.

Page 11 of 14

Figure 11.

Figure 12.

Page 12 of 14

Figure 13.

Page 13 of 14

CODE 1 Data _null_ ;

File "C:\REDCap\Data_Dictionary\PharmaSUG_2014\DD_20140118.csv"

DSD

Dlm = "2C"x

LRECL = 2000

;

If _n_ = 1

Then Put "Variable / Field Name"

",Form Name"

",Section Header"

",Field Type"

",Field Label"

',"Choices,Calculations,OR Slider Labels"'

",Field Note"

",Text Validation Type OR Show Slider Number"

",Text Validation Min"

",Text Validation Max"

",Identifier?"

",Branching Logic (Show field only if...)"

",Required Field?"

",Custom Alignment"

",Question Number (surveys only)"

",Matrix Group Name"

;

/* Set DD ;

Array RC_Col ( 18 ) $ 500 ; Do _N_ = 1 To 18 ;

Put RC_Col( _N_ ) @ ; End ;

Put ; */

Run ;

Page 14 of 14

CODE 2 1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

%macro removeOldFile(bye); %if %sysfunc(exist(&bye.)) %then %do; proc delete data=&bye.;

run; %end; %mend removeOldFile; %removeOldFile(work.redcap); data REDCAP; %let _EFIERR_ = 0;

infile 'PharmaSUG2014PO19_DATA_NOHDRS_2014-04-13_1328.csv' delimiter = ',' MISSOVER DSD

lrecl=32767 firstobs=1 ;

informat record_id $500. ;

informat learn best32. ;

informat issue $500. ;

informat date yymmdd10. ;

informat my_first_instrument_complete best32. ;

format record_id $500. ;

format learn best12. ;

format issue $500. ;

format date yymmdd10. ;

format my_first_instrument_complete best12. ;

input

record_id $

learn

issue $

date

my_first_instrument_complete

;

if _ERROR_ then call symput('_EFIERR_',"1");

run;

proc contents;run;

data redcap;

set redcap;

label record_id='Record ID';

label learn='How much did this paper increase your knowledge of REDCap?';

label issue='If you learned nothing, please tell us why?';

label date='Todays Date';

label my_first_instrument_complete='Complete?';

run;

proc format; value learn_ 0='None' 1='A Modest Amount'

2='A Great Amount'; value my_first_instrument_complete_ 0='Incomplete' 1='Unverified'

2='Complete'; run;

data redcap;

set redcap;

format learn learn_.;

format my_first_instrument_complete my_first_instrument_complete_.;

run;

proc contents data=redcap;

proc print data=redcap; run;

quit;