November 17, 2021 - Demo clinDataReview

Outline

  • Introduction to clinical data review
  • Demonstration of the clinical data review tool
  • Behind the scene
  • Q&A

Tool developed in collaboration between:
Galapagos biotech company 🤝 OpenAnalytics data science company

What is clinical data review?

  • Clinical data review:
    • for review of the data collected during a clinical trial
    • (clinical monitoring) follow-up progress study according to protocol
    • exploration and review of safety data: early detection of safety signals
  • Diverse audiences:
    • statistician, statistical programmer, data management
    • medical monitors, physician
    • external audience: data monitoring committee
  • Goals of the tool:
    • interactive tool with standard set of visualizations/tables of safety data
    • deliverable reproducible, tracebable and easily shareable with different users
    • sufficient customization (tailored to study if needed)
    • user-friendly: software (non R users)/data format
    • for blinded (interim) and unblinded (specific trials) data analysis
    • table compatible with Clinical Study Report format

Demonstration of the clinical data review tool

Example clinical data review report

  • Example monitoring report available at:
    https://medical-monitoring.openanalytics.io
    (Report generated with latest version of the R packages)
  • 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
  • Comparison of data/batch based on the creation of a dummy dataset with modification of records of CDISC original pilot dataset

Behind the scene

Data sources

The tool supports standard clinical data formats:

Datasets in SAS data format (sas7bdat/xpt) are imported into R via the haven package.

Creation of the clinDataReview report

  • The clinical data review 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)
      Each configuration file corresponds to one HTML section.
  • Chapters are combined into 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.

Configuration file

The input parameters are documented (at package creation) and checked (at run time) for each template report via a JSON schema file.

YAML configuration file (study-specific)

# Report-specific parameters
template: summaryTableTemplate.Rmd
templatePackage: clinDataReview
reportTitle: Demographics
# Dataset of interest
dataFileName: "dm.xpt"
dataProcessing:
  - filter:
    # safety analysis set
    - var: "RFXSTDTC" 
      value: ""
      rev: true
# Table parameters
tableParams:
  var: ["AGE", "SEX", "RACE", "ETHNIC"]
  varInclude0: TRUE
  colVar: ARM
# for docx export (optional):
tableParamsDocx:
  file: summaryDemographics.docx
  statsVar: ['Median (range)', 'n (%)']

JSON schema documentation file (in R package)

{
  "title" : "Clinical data template for a summary table of the data",
  "description" : "This report summarizes the data of interest.
  This table is displayed with an interactive table in the report, 
  and exported to a docx file." 
  "properties": {
    "template": {
      "const": "summaryTableTemplate.Rmd",
      "doc": "name of the template report"
    },
    "dataFileName" : {
      "type": "string",
      "doc": "name of the data file of interest"
    },
    "dataProcessing": {
      "type": "array",
      "doc": "data processing parameters, ..."
    }, ...
  },
  "required": ["template", "templatePackage", "reportTitle", 
    "dataFileName", "plotFunction", "plotParams"],
}

Clinical data review

  • Template reports (Rmarkdown) and associated documentation (JSON file)
  • Interactive standalone visualizations (with plotly)
plotly
  • Custom Javascript for download of patient profiles from each interactive table & visualization of the report

clinDataReview in CRAN & Github

Patient profiles

The patient profile offers overview of a clinical trial for a specific patient

  • subject demographic information
  • treatment exposure
  • adverse events
  • laboratory measurements
  • concomitant medications

In the clinical data review report, the profile for a specific patient of interest is available from the summary tables and visualizations (selection/click on the P key).

Creation with the patientProfilesVis package, available in: CRAN & Github

Summary tables

Summary table of descriptive statistics are available in:

  • interactive html format (DT) in the report
  • static CSR-ready MSWord format (flextable)

Creation with the inTextSummaryTable package, available in: CRAN & Github

Comparison of interim data batches

  • Reflects data collection/completeness patient data delivered over time for an ongoing trial
  • Differences between batches indicated in listing and summary tables, and displayed in visualizations
Listing: comparison between data batches

Listing: comparison between data batches

Reproducibility

  • Code versioning:
    • git Source Control Management:
      • source code of R packages
      • study-specific configuration files
    • R package versioning + R session information in reports
  • Data versioning

Quality control (1)

  • Unit tests are available in the R packages (testthat, 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 = "clinDataReview", "template", "divisionTemplate.json")
    expect_error(checkConfigFile(configFile, refConfig))
})

Quality control (2)

  • Automated package build/check (including unit tests) with a CI/CD platform (Jenkins)

Conclusions

  • In-house clinical data review 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 review of clinical data to the Medical Monitors
    • Earlier data QC and involvement of biometrics group (data manager, stat programmer, biostatistician)
    • Tailored to the needs of the Medical Monitors

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

R packages available in CRAN and github

Thanks

Thanks to all contributors!

  • OpenAnalytics: Michela Pasetto, Lennart Tuijnder, Laure Cougnaud
  • Galapagos: Biometrics team: Paul Meyvisch, Arne de Roeck, Margaux Faes, Dirk Van Krunckelsven, medics, …

Q&A

Any questions?