| Type: | Package |
| Title: | Open Validator for FDA Study-Data Submissions |
| Version: | 0.1.1 |
| 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. |
| License: | MIT + file LICENSE |
| URL: | https://github.com/shekharchalwadigrepo-hub/openstudyval |
| BugReports: | https://github.com/shekharchalwadigrepo-hub/openstudyval/issues |
| Encoding: | UTF-8 |
| Language: | en-US |
| Depends: | R (≥ 4.1.0) |
| Imports: | stats, tools, utils |
| Suggests: | haven, xml2, knitr, rmarkdown, testthat (≥ 3.0.0) |
| VignetteBuilder: | knitr |
| Config/testthat/edition: | 3 |
| RoxygenNote: | 7.3.2 |
| NeedsCompilation: | no |
| Packaged: | 2026-10-12 10:04:38 UTC; skrch |
| Author: | Shekhar Eranna Chalwadi [aut, cre] |
| Maintainer: | Shekhar Eranna Chalwadi <skrchalwadicg@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-10-21 16:30:02 UTC |
Open validator for FDA study-data submissions
Description
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.
Author(s)
Shekhar Eranna Chalwadi
See Also
validate_submission, rules_catalog
Path to a bundled example study
Description
Example studies intentionally contain conformance issues so a first validation run produces a non-empty report.
Usage
example_study(which = c("sdtm", "adam"))
Arguments
which |
|
Value
Character path to the example directory.
Examples
example_study("sdtm")
Validation report object
Description
An osv_report contains issue rows, a dataset inventory, the standard,
and the engine label. Severity order is Reject, Error, Warning, Note.
Usage
## 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, ...)
Arguments
x, object |
An |
row.names |
Ignored. Present for the |
optional |
Ignored. Present for the |
... |
Passed to further methods. |
Value
summary returns a data frame of one row per rule.
as.data.frame returns the issue-level data frame.
Examples
report <- validate_submission(example_study("sdtm"), standard = "SDTM")
print(report)
as.data.frame(report)
Read a study-data folder
Description
CSV and RDS files are read with base R. SAS transport files (.xpt)
are read with haven when that package is installed.
Usage
read_study_data(path)
Arguments
path |
Directory containing study datasets, or a character vector of file paths. |
Value
A named list of data frames. Each element has a source_file
attribute. Names are the upper-case file stem.
Examples
study <- read_study_data(example_study("sdtm"))
names(study)
Rule catalog helpers
Description
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.
Usage
rules_catalog(standard = NULL)
explain_rule(rule_id)
add_custom_rules(rules, catalog = rules_catalog())
severity_levels()
Arguments
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 |
Value
rules_catalog and explain_rule return a data frame.
add_custom_rules returns the combined catalog.
severity_levels returns a character vector.
Examples
head(rules_catalog("SDTM"))
explain_rule("SDTM024")
severity_levels()
Validate datasets already in memory
Description
Same engine as validate_submission for data already loaded.
Usage
validate_datasets(
datasets,
standard = c("SDTM", "SEND", "ADaM"),
define = NULL,
rules = NULL,
ct = NULL,
version_label = "openstudyval 0.1.0",
path = NULL
)
Arguments
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. |
Value
An object of class osv_report.
Examples
study <- read_study_data(example_study("adam"))
validate_datasets(study, standard = "ADaM")
Validate a study-data folder
Description
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.
Usage
validate_submission(
path,
standard = c("SDTM", "SEND", "ADaM"),
define = NULL,
rules = NULL,
ct = NULL,
version_label = "openstudyval 0.1.0"
)
Arguments
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. |
Details
The result is not a regulatory certification. Agency engines remain the reference for a live submission.
Value
An object of class osv_report.
See Also
validate_datasets, write_validation_report
Examples
report <- validate_submission(example_study("sdtm"), standard = "SDTM")
summary(report)
Write an HTML or CSV validation report
Description
Writes a submission-style issue summary. The HTML layout is original and is not a Pinnacle 21 report.
Usage
write_validation_report(report, file)
Arguments
report |
An |
file |
Path ending in |
Value
The written path, invisibly.
Examples
report <- validate_submission(example_study("sdtm"), standard = "SDTM")
dest <- file.path(tempdir(), "osv-report.html")
write_validation_report(report, dest)