Validating an FDA study-data package

knitr::opts_chunk$set(collapse = TRUE, comment = "#>")

What this package is

openstudyval is an independent R validator for a study-data folder prepared for an FDA submission. It covers:

It is not Pinnacle 21, and a clean report is not an FDA certification.

Run the bundled example

library(openstudyval)
report <- validate_submission(example_study("sdtm"), standard = "SDTM")
summary(report)

Write the HTML report next to your study:

write_validation_report(report, "validation-report.html")

Add a study-specific rule

extra <- data.frame(
  rule_id = "CUST_ARM",
  publisher = "sponsor",
  standard = "SDTM",
  domains = "DM",
  severity = "Error",
  check = "codelist",
  argument = "ARMCD=A|B",
  message = "ARMCD is not in the study arm codelist.",
  guidance = "Protocol section 6",
  stringsAsFactors = FALSE
)
study <- read_study_data(example_study("sdtm"))
custom <- validate_datasets(study, standard = "SDTM", rules = extra)
"CUST_ARM" %in% custom$issues$rule_id

Full MedDRA and WHODrug dictionaries are licensed and are not bundled. Pass permitted terms in ct or as the right-hand side of a codelist rule.



Try the openstudyval package in your browser

Any scripts or data that you put into this service are public.

openstudyval documentation built on Oct. 21, 2026, 5:14 p.m.