Thanks for using our webapp. This web application is used to import and export data with the REDcap and Google Sheets.
Note: This webapp was developed and deployed by students at University of Delaware, but other universities can deploy their own versions with the instructions below.
-
Export data to Google sheets.
-
Import data from Google sheets to REDCap.
-
Delete data from REDCap.
Install the requirements.txt file with
pip install-r requirements.txt
Using the command below for pip3 on MacOS. ex.
pip3 install -r requirements.txt
Using all commands below to install all modules.
pip install pandas
pip install --upgrade google-api-python-client google-auth-httplib2google-auth-oauthlib
pip install pycap
if you use these scripts, you need a config.json file in config/ with the following
contents:
{
"api_url": "link-to-REDCap-API",
"secret_key": "secret-key-for-flask",
"client_secret": "path-to-client-secret",
"scopes": ["https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/userinfo.profile"],
"base_url" : "link-to-local-host"
}
The user will also need a clinet_secret.jsonfile in config/.
- To get the client secret.json you must go to: https://console.cloud.google.com/home/dashboard
- On this page click:
- Navigation Menu->APIs & Services->Credentials ->Desktopclient 1
- On this page click:
- "DOWNLOAD JSON" Move this file into your project directory
- A Google account which has the right to edit Google Sheets.
- A REDCap account and API key
- Install the above Requirements
- University of Delaware VPN (if using UD's instance)
- Login to your UD VPN
- Go to following link http://redcap.cis.udel.edu/
1.Run this python script with the following: python app.py
2.Copy this link to your website. (and do not exist this window)
3.Then you will come to this page.
4.Next, log in to your Google account with the red button at the top right
5.When you log into your Google account, agree toall options, permissions, and continue.
6.Next, Go to the setting at the top left
7.Then submit your RedCap API
8.After you submit your REDCap API, it will show thatREDCap Api key entered successfully! Then back to the home page in the top left
Congratulations, you've completed all the steps. Nowyou can start using this app!!!
1.How to export data to Google sheets. 1.In the lower right section, you can export datato Google Sheets.
- You can export all events or you can select the data which you want to. And also to choose the target sheet. Finally, click Export button
2.How to import data from Google sheets to REDCap. 1.In the lower left section, you can import data fromGoogle Sheets to REDCap
- You can import all events to REDCap or you can select the data which you want to. And also to choose the target sheet. Finally, click ImportButton
3.How to delete data from REDCap. 1.In the middle section, you can delete data from REDCap
- You can click the delete button (red one) to deletethe data, but make sure that you have permission to delete those. If you don't have permission,it will show “you don't have permission to delete”. If you have permission to delete, it willshow “delete successfully.”
- You can choose which event, and which participantID you want to delete.
Created by:
- Mario Durso
- Justin Hamilton
- Nick Napior
- Kojo Otchere-Addo
- Zhenghan Wang












