37
Optimizing Subject Management of a Large Multi-site Randomized Controlled Trial: Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong [email protected] Feb 21, 2018 Washington University Department of Psychiatry | healthymind.wustl.edu

Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong [email protected] Feb 21, 2018 Washington University

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Optimizing Subject Management of a Large Multi-site Randomized Controlled Trial: Implementation of R Shiny Dashboard with Real-time Data

Yongqi Zhong [email protected]

Feb 21, 2018 Washington University Department of Psychiatry | healthymind.wustl.edu

Page 2: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Overview

▪ Introduction of R Shiny ▪ Redcap Reports & API ▪ Optimum Dashboard ▪ Demonstration of Sample Shiny App ▪ Implications

2

Page 3: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Introduction of R Shiny Shiny & Shiny Dashboard

Page 4: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

“ Shiny is an R package that makes it easy to build interactive web apps straight from R.

- R Studio

4

Page 5: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Basic Structure of Shiny

▪ library(Shiny) ▪ ui <- fluidPage() ▪ server <- function (input, output){} ▪ shinyApp(ui = ui, server = server)

5

Page 6: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Server

▪ Input (defined in either server or UI) ▫ Dropdown Menu ▫ Radio Button ▫ Text, Slider, etc.

▪ Output ▫ Data Table ▫ Plot ▫ Text, Image, etc.

6

Page 7: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Server Cont.

▪ server <- function (input, output){ ▫ output$plot <- renderPlot({

▫ hist(iris$Petal.Length) ▫ })

}

7

Page 8: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

UI

▪ HTML ▪ CSS ▪ JS ▪ Layouts ▪ Shiny Dashboard

8 *Extracted from Shiny Cheat Sheet

Page 9: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Shiny Dashboard ▪ ui <- dashboardPage(

▫ dashboardHeader(title="test"), ▫ dashboardSidebar(sidebarMenu(

▫ menuItem( ▫ "Welcome", ▫ tabName = "welcome", ▫ icon = icon("gift")))),

▫ dashboardBody( ▫ tabItems(

▫ tabItem( ▫ tabName = "welcome", ▫ h3("Welcome"), ▫ box("Iris Petal Length Histogram",

▫ plotOutput("plot")) ▪ ))))

9

Page 10: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Other Dashboard Layout Option ▪ flexdashboard (R Markdown)

▫ https://rmarkdown.rstudio.com/flexdashboard/

10 Source: https://beta.rstudioconnect.com/jjallaire/shiny-eruptions/

Page 11: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Redcap Reports & API Viewing Data from Redcap

Page 12: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Traditional Redcap Reports

▪ Pros ▫ Easy to use

▪ Cons ▫ Limited options

12

Place your screenshot here

Page 13: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Redcap API ▪ library(RCurl) ▪ result <- postForm(

▫ uri=‘XXXXXXX’, ▫ token=‘XXXXXXXXXXX', ▫ content='report', ▫ format=‘csv', ▫ report_id='‘XXXX”, ▫ rawOrLabel='raw', ▫ rawOrLabelHeaders='raw', ▫ exportCheckboxLabel='false', ▫ returnFormat=‘csv'

▪ ) ▪ result_df <-read.csv(textConnection(result), sep = ",", fill = T, stringsAsFactors = F, na.strings =

"", header = T) 13

Place your screenshot here

Page 14: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Redcap API Cont.

Export Options ▪ Record ID ▪ Reports ▪ Instruments

Other Packages ▪ redcapAPI

▫ https://github.com/nutterb/redcapAPI

▪ REDCapR ▫ https://github.com/OuhscBbmc/RE

DCapR

14

Page 15: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Optimum Dashboard WashU’s first Shiny web application using Shiny Server Pro.

Page 16: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Optimizing Outcomes of Treatment-Resistant Depression in Older Adults

▪ Principal Investigator: Dr. Eric Lenze

16

Washington University Department of Psychiatry

https://www.optimumstudy.org/

Page 17: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Step 1 (for 10 weeks): Patient is prescribed augmentation with aripiprazole or bupropion, or switched to bupropion

OPTIMUM study design

What are we measuring?

We look at symptomatic remission, well-being, safety, falls, cognitive function,

& mobility.

4-month acute phase(above)

• Age 60+

• Major depression

• Non-responder to two or more antidepressant trials

N=500

N=500

N=500

N=1,500

STUDY POPULATION

N=400

Augmentationwith aripiprazole

Augmentationwith bupropion

Switch tobupropion

Remission

Switch to nortriptyline

Augmentationwith lithium

N=400

(N estimated)

Those who complete acute phase will be followed in a one-year continuation.

1 Step 2 (for 10 weeks): Those who do not improve in Step 1 receive lithium augmentation or switched to nortriptyline

2

Page 18: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Community clinicians are at the center

The OPTIMUM study team partners with community clinicians to treat older adults with depression. •Patients stay with their own provider. •Provider prescribes medication. • Study team guides treatment steps.

Page 19: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Enrollment at 5 sites

▪ Washington University serves as the Central Coordinating Site

ColumbiaUniversity

New

York

WashingtonHeights

Harlem

NEW

YORK

Toronto

ONTARIO

CANADA

U.S.

Buffalo

Algonquin

Provincial

Park

Universityof Toronto

WestHollywood

HolmbyHills

LaderaHeights

ElSegundo

SantaMonica

Los Angeles

UCLA

Pittsburgh

AlleghenyCounty

University ofPittsburgh

St.Louis

Ferguson

Wellston

Pine Lawn

Soulard

MISSOURIILLINOIS

WashingtonUniversity

Page 20: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

$ 13,500,000 Grant awarded from PCORI

50+ staff for 5 years Need reports

1,500 subjects at 5 sites We aimed to enroll

20

Page 21: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

What we need? ▪ Tables for weekly internal subject review ▪ Study participant’s characteristics & enrollment ▪ Data & safety monitoring ▪ Real-time report ▪ Easy to access and use ▪ …

21

Page 22: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Optimum Dashboard

22

Page 23: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Dashboard Structure ▪ Welcome (Landing Page) ▪ Patient Tracking ▪ Patient Information ▪ Aggregated Charts ▪ To-do List

23

Page 24: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

24

Welcome (Landing Page)

Better user experience

Page 25: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

25

Patient Tracking

Date: PHQ9: Continue/Increase/Decrease Med X mg (multiple rows of data in one cell)

Page 26: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

26

Patient Information

Page 27: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

27

Patient Information Cont.

Active Medications

Page 28: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

28

Aggregated Charts

Page 29: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

29

Aggregated Charts Cont.

Place your screenshot here

Page 30: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

30

To-do List

Page 31: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

User Authentication & Privileges Dashboard Deployment on Shiny Server Pro 🔑 ▪ User authentication is only available when the app is deployed on

the server (https://www.rstudio.com/products/shiny-server-pro/) ▫ Protected Health Information (PHI) ▫ Access outside WashU ▫ Version control using Git on GitLab

▪ Collaboration with the Institute for Informatics (I2) (http://informatics.wustl.edu/)

31

Page 32: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Data Flow & User Privileges

Redcap

All Sites’ Data

Eligibility Database

(Cross-sectional)

32

Main Database (Longitudinal)

Site Subsetted

Data

All Data

Individual-level Data

Aggregated Data

Tables & Charts

Admin

Site Users

No Individual

Data Shown

All Users

Page 34: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Implications Explore new possibilities

Page 35: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

Implications Needs and workflow of the study Thinking like a product manager as well as data analyst

Real-time data management Consider the efficiency of the codes for data wrangling & cleaning

Opportunities Publishing Shiny apps in academic journals (e.g. Bowman RL, Wang Q, Carro A, Verhaak RG, Squatrito M. GlioVis data portal for visualization and analysis of brain tumor expression datasets. Neuro-oncology. 2016 Nov 9;19(1):139-41.) 35

Page 36: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

References ▪ Optimum Study:

▫ https://www.optimumstudy.org/ ▪ Shiny Cheat Sheet:

▫ https://github.com/rstudio/cheatsheets/raw/master/shiny.pdf ▪ http://shiny.rstudio.com/ ▪ https://rstudio.github.io/shinydashboard/index.html ▪ https://rstudio.github.io/DT/

36

Page 37: Optimizing Subject Management of a Large Multi-site ... · Implementation of R Shiny Dashboard with Real-time Data Yongqi Zhong y.zhong@wustl.edu Feb 21, 2018 Washington University

THANKS! Any questions? You can find me at: [email protected]

37

Washington University Department of Psychiatry | healthymind.wustl.edu