Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 2.63 KB

README.md

File metadata and controls

45 lines (38 loc) · 2.63 KB

Automating Tasks with the Redcap API

CAPS Presentation, Aug 29, 2018

This repo contains:

  • A pdf export of the presentation
  • Three Jupyter notebooks. The notebooks progress from the basics to fully functional code that can be adapted for a project:
    • Intro to Python 3
      • Basic data structures
      • Comprehensions
      • Map, filter
      • Lambda expressions
      • Functions
      • Loops
      • Exception handling
    • Data Wrangling with Redcap
      • Import test data into a simple longitudinal project
        • Consists of baseline, 6, and 12 Month events
        • Repeating instrument
        • Randomized participants
      • Exporting data records from the API
        • Caching data locally
      • Exporting the data dictionary from the API
        • Using the dictionary with raw and labeled data
      • Importing and deleting files using the API
      • Demonstration of import overwrite behavior
      • Data wrangling Redcap data using lists, dicts, series, and DataFrames
        • Missing data
        • Filtering DataFrames
        • Transforming data
    • Messaging with Email and the Twilio API
      • Sending email notifications with the SMTP protocol
      • Using Python logging to record events
      • Sending SMS to study participants using Twilio
      • Checking SMS delivery status
      • Twilio datetime localization
      • Importing Twilio status data into a Redcap instrument
  • An XML copy of the Redcap demo project that is paired with this code is also available. This file can be imported into Redcap by selecting 'New Project' and choosing the option 'Upload a REDCap project XML file (CDISC ODM format)'.
  • A sample randomization template used with the demo project

The second and third notebooks use the Redcapy library, which provides convenience methods for accessing commonly used Redcap API endpoints in our projects.