| Title: | Open Validator for FDA Study-Data Submissions |
|---|---|
| Description: | Validates clinical and nonclinical study-data packages against publicly described FDA technical-rejection criteria, SAS XPORT constraints from the Study Data Technical Conformance Guide, and an extensible catalog of SDTM, SEND, and ADaM structural conformance checks. Reads a study folder of CSV, RDS, or (when the suggested package haven is installed) SAS v5/v8 transport files, optionally checks define.xml, and writes a submission-style HTML and CSV validation report. This package is an independent open-source implementation. It is not affiliated with, endorsed by, or a copy of Pinnacle 21, Certara, or the FDA. |
| Authors: | Shekhar Eranna Chalwadi [aut, cre] |
| Maintainer: | Shekhar Eranna Chalwadi <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-10-22 10:44:39 UTC |
| Source: | https://github.com/shekharchalwadigrepo-hub/openstudyval |
Validates a study folder against publicly described FDA technical-rejection criteria, SAS XPORT constraints, and an extensible SDTM, SEND, and ADaM structural catalog. Independent of Pinnacle 21 and not an FDA certification.
Shekhar Eranna Chalwadi
validate_submission, rules_catalog
Example studies intentionally contain conformance issues so a first validation run produces a non-empty report.
example_study(which = c("sdtm", "adam"))example_study(which = c("sdtm", "adam"))
which |
|
Character path to the example directory.
example_study("sdtm")example_study("sdtm")
An osv_report contains issue rows, a dataset inventory, the standard,
and the engine label. Severity order is Reject, Error, Warning, Note.
## S3 method for class 'osv_report' print(x, ...) ## S3 method for class 'osv_report' summary(object, ...) ## S3 method for class 'osv_report' as.data.frame(x, row.names = NULL, optional = FALSE, ...)## S3 method for class 'osv_report' print(x, ...) ## S3 method for class 'osv_report' summary(object, ...) ## S3 method for class 'osv_report' as.data.frame(x, row.names = NULL, optional = FALSE, ...)
x, object
|
An |
row.names |
Ignored. Present for the |
optional |
Ignored. Present for the |
... |
Passed to further methods. |
summary returns a data frame of one row per rule.
as.data.frame returns the issue-level data frame.
report <- validate_submission(example_study("sdtm"), standard = "SDTM") print(report) as.data.frame(report)report <- validate_submission(example_study("sdtm"), standard = "SDTM") print(report) as.data.frame(report)
CSV and RDS files are read with base R. SAS transport files (.xpt)
are read with haven when that package is installed.
read_study_data(path)read_study_data(path)
path |
Directory containing study datasets, or a character vector of file paths. |
A named list of data frames. Each element has a source_file
attribute. Names are the upper-case file stem.
study <- read_study_data(example_study("sdtm")) names(study)study <- read_study_data(example_study("sdtm")) names(study)
The catalog is an original implementation of publicly described expectations.
Messages are not copied from Pinnacle 21 or from CDISC conformance-rule
publications. Supported check types are dataset_required,
variable_required, codelist, iso8601, key_unique,
one_to_one, nonmissing, and regex.
rules_catalog(standard = NULL) explain_rule(rule_id) add_custom_rules(rules, catalog = rules_catalog()) severity_levels()rules_catalog(standard = NULL) explain_rule(rule_id) add_custom_rules(rules, catalog = rules_catalog()) severity_levels()
standard |
Optional filter: |
rule_id |
Rule identifier, such as |
rules |
Data frame of additional rules with the catalog columns. |
catalog |
Catalog to extend. Defaults to |
rules_catalog and explain_rule return a data frame.
add_custom_rules returns the combined catalog.
severity_levels returns a character vector.
head(rules_catalog("SDTM")) explain_rule("SDTM024") severity_levels()head(rules_catalog("SDTM")) explain_rule("SDTM024") severity_levels()
Same engine as validate_submission for data already loaded.
validate_datasets( datasets, standard = c("SDTM", "SEND", "ADaM"), define = NULL, rules = NULL, ct = NULL, version_label = "openstudyval 0.1.0", path = NULL )validate_datasets( datasets, standard = c("SDTM", "SEND", "ADaM"), define = NULL, rules = NULL, ct = NULL, version_label = "openstudyval 0.1.0", path = NULL )
datasets |
Named list of data frames, as returned by
|
standard |
One of |
define |
Optional define.xml path. |
rules |
Optional extra rules. |
ct |
Optional controlled terminology data frame. |
version_label |
Report label. |
path |
Original folder, used only for technical-rejection file checks. |
An object of class osv_report.
study <- read_study_data(example_study("adam")) validate_datasets(study, standard = "ADaM")study <- read_study_data(example_study("adam")) validate_datasets(study, standard = "ADaM")
Reads datasets, then runs XPORT constraints, standard-specific structural checks, the built-in rule catalog, technical-rejection criteria, and an optional define.xml cross-check.
validate_submission( path, standard = c("SDTM", "SEND", "ADaM"), define = NULL, rules = NULL, ct = NULL, version_label = "openstudyval 0.1.0" )validate_submission( path, standard = c("SDTM", "SEND", "ADaM"), define = NULL, rules = NULL, ct = NULL, version_label = "openstudyval 0.1.0" )
path |
Directory of datasets, or a vector of dataset files. |
standard |
One of |
define |
Optional path to define.xml. If |
rules |
Optional data frame of extra rules. See |
ct |
Optional data frame of controlled terminology. Column names are variable names and values are permitted terms. |
version_label |
Character label stored on the report. |
The result is not a regulatory certification. Agency engines remain the reference for a live submission.
An object of class osv_report.
validate_datasets, write_validation_report
report <- validate_submission(example_study("sdtm"), standard = "SDTM") summary(report)report <- validate_submission(example_study("sdtm"), standard = "SDTM") summary(report)
Writes a submission-style issue summary. The HTML layout is original and is not a Pinnacle 21 report.
write_validation_report(report, file)write_validation_report(report, file)
report |
An |
file |
Path ending in |
The written path, invisibly.
report <- validate_submission(example_study("sdtm"), standard = "SDTM") dest <- file.path(tempdir(), "osv-report.html") write_validation_report(report, dest)report <- validate_submission(example_study("sdtm"), standard = "SDTM") dest <- file.path(tempdir(), "osv-report.html") write_validation_report(report, dest)