October 13, 2020 - R/Pharma Conference

Outline

What is medical monitoring?

  • Medical monitoring/oversight:
    • exploration and review of safety data collected during a clinical trial by the Medical Monitors
    • early detection of safety signals
  • Goals of the project:
    • develop an interactive in-house tool with standard set of visualizations/tables of raw safety data
    • full customization
    • to handle both blinded (interim) and unblinded (specific trials) data analysis
    • user-friendly for Medical Monitors (no experience in R)
    • align format with tables of the Clinical Study Report

Demonstration

  • Example monitoring report available at: https://medical-monitoring.openanalytics.io/report/
  • Based on the original pilot study dataset from CDISC :
    • SDTM datasets, available in PhUSE github
    • to investigate safety and efficacy of the Xanomeline Transdermal Therapeutic system in patients with mild to moderate Alzheimer disease
    • safety endpoints of interest: adverse events, vital signs, laboratory evaluations
    • for demo purpose of batch comparison functionality:
      creation of dummy dataset with modification of records of CDISC original pilot dataset

How the medical oversight tool is produced?

  • Data workflow:
    • study interim SDTM dataset
    • conversion to SDTM+’ data format
    • import SDTM+’ SAS dataset into R (haven)
  • Creation of the medical monitoring report in validated R environment
  • HTML report

Creation of the medicalMonitoring report

  • The medical monitoring report, in HTML format, consists of a set of chapters.
  • Each chapter is created based on:
    • a standard template report (or user custom analysis report) in R Markdown format
    • a configuration file for the user to set the study-specific parameters (YAML format)
      This configuration file is created manually (or via an Shiny interface in the future)
      Each configuration file corresponds to one HTML section.
  • Chapters are combined in a gitbook HTML report (bookdown)

Chapters that share the same kind of analysis (e.g. scatterplots, summary tables) are rendered by one Rmd template document.

Config files

The validation (at run time) and documentation (at package creation) of the input parameters in the config files is automated with the JSON schema format.

Special functionalities

  • Interactive visualizations
    • custom medicalMonitoring R package contains standard set of visualizations (plotly)
  • Explore subject-specific information with patient profiles
    • = visualization of subject-specific visualization along clinical trial timelines
    • download patient profiles associated from interactive plot/table (selection/click on the P key)
    • custom patientProfilesVis R package + Javascript code
  • Summary descriptive statistics table
    • interactive html format (DT) in the report + export to CSR-ready MSWord format (flextable)
    • custom inTextSummaryTable R package: generic creation of table of descriptive statistics
  • Comparison of interim data batches
    • reflects patient data collection/completeness delivered over time for an ongoing trial
    • comparison table for summary table/listing or highlighting in visualization (compareDF)
  • Study-specific alert defined by the study medic

Quality control of the report

  • Work together with QA department to setup a qualified R environment

  • Risk-based quality control of the report output (e.g. spot-checks of specific TLFs)
    Level of QC according to risk on patient safety (e.g. adverse events > medical history)

  • Quality control of the R packages: unit tests (testthat) + test coverage (covr)

Example of unit tests of the reporting workflow:

context("Test reporting template functions")
library(yaml)
test_that("Test check of config file parameters", { 
    # create example of incomplete config file
    configFile <- tempfile("configDivision", fileext = ".yml") 
    write_yaml(list(reportTitle = "Study name"), configFile)
    # check config file versus JSON schema
    refConfig <- system.file(package = "medicalMonitoring", "template", "divisionTemplate.json")
    expect_error(checkConfigFile(configFile, refConfig))
})

Quality control of the report

  • Quality control of the R packages:
    • Code versioning: traditional R package versioning + git Source Control Management
    • Automated package build/check (including unit tests) on Jenkins CI/CD platform

Conclusions

  • In-house medical monitoring tool in R (for full customization)
    • Integration with patient profiles
    • CSR-ready in-text tables
    • Set up of study-specific alerts
    • Interim data batch comparison
  • Benefits:
    • Provide an extra exploration tool for medical oversight of clinical data to the Medical Monitors
    • Earlier data QC and involvement of Biometrics (data manager, stat programmer, biostatistician)
    • Tailored to the needs of the Medical Monitors (in compliance with the GLPG standard procedures)

Slides/demo available at: https://medical-monitoring.openanalytics.io/

If you have any feedback or extra questions, contact us at:
laure.cougnaud[at]openanalytics.eu; michela.pasetto[at]openanalytics.eu; arne.deroeck[at]glpg.com

Thank you!