| Title: | Versioned CDISC Standards Reference Data |
|---|---|
| Description: | Provides versioned reference data for the standards of the Clinical Data Interchange Standards Consortium (CDISC) <https://www.cdisc.org/standards>: the CDISC Controlled Terminology (CT) for the Study Data Tabulation Model (SDTM) and the Analysis Data Model (ADaM); variable metadata for the SDTM model and for the families of the SDTM Implementation Guide (SDTMIG), the Standard for Exchange of Nonclinical Data Implementation Guide (SENDIG), and the ADaM Implementation Guide (ADaMIG); the Clinical Data Acquisition Standards Harmonization (CDASH) model and implementation guide; the Questionnaires, Ratings, and Scales (QRS) supplements; and the Define-XML schemas, written in the Extensible Markup Language (XML) Schema Definition (XSD) language, with Extensible Stylesheet Language Transformations (XSLT) stylesheets for them. A validity-date design stores every historical CT version compactly, without duplicating rows. Intended as a shared data dependency for pharmaverse-aligned packages <https://pharmaverse.org>. |
| Authors: | Bill Denney [aut, cre] (ORCID: <https://orcid.org/0000-0002-5759-428X>), Clinical Data Interchange Standards Consortium (CDISC) [cph] (Define-XML schema files in inst/extdata/schema (MIT License)), Lex Jansen [cph] (Define-XML stylesheets in inst/extdata/stylesheet (MIT License)), National Cancer Institute Enterprise Vocabulary Services [dtc] (CDISC Controlled Terminology (public domain)) |
| Maintainer: | Bill Denney <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-10-25 11:59:31 UTC |
| Source: | https://github.com/humanpred/cdiscdata |
List available CT versions
available_ct_versions(type = c("sdtm", "adam"))available_ct_versions(type = c("sdtm", "adam"))
type |
One of |
Character vector of version date strings, newest first,
e.g. c("2026-03-27", "2025-09-27", ...).
available_ct_versions("sdtm") available_ct_versions("adam")available_ct_versions("sdtm") available_ct_versions("adam")
Combines get_ig (variable name, label, type, core, order,
codelist) with get_ct (is that codelist in the controlled
terminology release) into a single, ready-to-use variable specification for
one of the three PK datasets. PP and SUPPPP draw on an
SDTM-side implementation guide (SUPPPP from the generic SUPP–
structure, since CDISC has no domain-specific SUPPPP table); ADPP
draws on the ADaMIG Basic Data Structure (BDS) table, since ADPP is a BDS
dataset and CDISC has no ADPP-specific table either. An ADPP spec can
optionally be unioned with the ADaMIG ADSL table (adsl), with a BDS
extension such as ADaMIG-NCA (extension), and with the SDTM PP
domain's variables (sdtm_domain).
build_domain_spec( domain = c("PP", "SUPPPP", "ADPP"), ig_version = NULL, ct_version = NULL, adsl = TRUE, sdtm_domain = NULL, sdtmig_version = NULL, standard = NULL, extension = NULL, extension_version = NULL )build_domain_spec( domain = c("PP", "SUPPPP", "ADPP"), ig_version = NULL, ct_version = NULL, adsl = TRUE, sdtm_domain = NULL, sdtmig_version = NULL, standard = NULL, extension = NULL, extension_version = NULL )
domain |
One of |
ig_version |
Version of |
ct_version |
CT version to check codelist ids against; passed to
|
adsl |
For |
sdtm_domain |
For |
sdtmig_version |
SDTMIG version to take the |
standard |
The implementation guide to take the domain's variables
from. |
extension |
For |
extension_version |
Version of the |
Neither the ADaMIG BDS nor ADSL tables define the PP-inherited
traceability variables (PPTESTCD, PPTEST, and the rest of
PP's variables that a BDS dataset built from PP typically carries
forward); which of PP's variables to carry into ADPP, and under what
names, is a downstream derivation choice (e.g. admiral's own
conventions), so they are only added when asked for with
sdtm_domain, and the default leaves them out.
A data frame with columns variable, label,
type, length, core, order, source, and
codelist_id. source is "SDTMIG" (or the SDTM-side
standard) for PP/SUPPPP; "BDS",
"ADSL", "SDTMIG", or the extension's name for ADPP.
order is the published order, renumbered consecutively, with
unioned variables following. codelist_id is the C-code of the
first codelist the IG lists for the variable, when that codelist is in
the CT release used, and NA otherwise (no codelist, or one not in
that release, e.g. a codelist since retired). length is always
NA: the CDISC Library exports this package is built from carry no
length, which is a sponsor choice, and the column is kept so existing
code that reads it keeps working. ADSL-sourced ADPP rows have
core forced to "Perm" regardless of their Core designation
in ADSL itself: from ADPP's perspective, merging in an ADSL variable is a
common but optional choice, not a requirement ADSL's own Core reflects.
build_domain_spec("PP") build_domain_spec("SUPPPP") build_domain_spec("ADPP") # BDS + ADSL (default) build_domain_spec("ADPP", adsl = FALSE) # BDS only build_domain_spec("ADPP", sdtm_domain = "PP") # BDS + ADSL + PP variables build_domain_spec("ADPP", extension = "NCA") # BDS + ADSL + ADaMIG-NCAbuild_domain_spec("PP") build_domain_spec("SUPPPP") build_domain_spec("ADPP") # BDS + ADSL (default) build_domain_spec("ADPP", adsl = FALSE) # BDS only build_domain_spec("ADPP", sdtm_domain = "PP") # BDS + ADSL + PP variables build_domain_spec("ADPP", extension = "NCA") # BDS + ADSL + ADaMIG-NCA
One row per variable of the CDISC Clinical Data Acquisition Standards
Harmonization (CDASH) model, at every version: 1.0, 1.1, 1.2, and 1.3.
Built from CDISC Library CSV exports not redistributed with this package
(see ig_sources); only variable metadata and the collection
wording (question text, prompt) is carried, not the model's definitions,
mapping instructions, or implementation notes. Retrieve it with
get_cdash("CDASH").
cdash_modelcdash_model
A data frame with columns:
Always "CDASH".
Model version, e.g. "1.3".
Observation or special-purpose class, e.g.
"Findings", "Identifiers".
The domain a domain-specific variable belongs to (e.g.
"AE"), or NA for class-level variables.
Position within the class and domain, as published.
CDASH variable name, e.g. "--TERM".
Variable label. At most 40 characters except for 6 labels
the model publishes longer (--TESTCD in 1.0 and 1.1;
--ENDATF in all four versions).
TRUE where the model flags the variable as
domain specific; NA where it does not say.
The CRF question text the model suggests.
The CRF field prompt the model suggests.
"Char" or "Num".
The SDTM variable or variables the collected value maps to.
The CDISC CT codelist C-code the variable uses;
NA when none.
A (standard, version, class, domain, variable) is unique. The model defines
most variables once per class with a -- prefix (domain is
NA) and some per domain.
CDISC Library CSV exports, downloaded under CDISC's terms and not
redistributed; see data-raw/README.md.
Summarise all bundled data versions
cdiscdata_versions()cdiscdata_versions()
A data frame with one row per data type showing the latest version, number of versions available, and when the data was last updated.
cdiscdata_versions()cdiscdata_versions()
Versioned CDISC ADaM Controlled Terminology from the NCI EVS FTP site.
Same validity-date design as ct_sdtm.
ct_adamct_adam
A data frame with the same columns as ct_sdtm.
https://evs.nci.nih.gov/ftp1/CDISC/ADaM/
Versioned CDISC SDTM Controlled Terminology from the NCI EVS FTP site.
Uses a validity-date design: one row per unique term-state across all
versions. A term is "current" when valid_to is NA.
ct_sdtmct_sdtm
A data frame with columns:
NCI C-code for the codelist, e.g. "C66731".
Submission value for the codelist, e.g. "SEX".
Long name, e.g. "Sex".
Logical; whether sponsor extensions are allowed.
NCI C-code for the term, e.g. "C16576".
NA for codelist-level rows.
Submission value, e.g. "F".
NA for codelist-level rows.
NCI preferred term / decoded value, e.g.
"Female".
Pipe-separated synonyms.
NCI definition text.
Date of the first CT release in which this row's content appeared.
Date of the last CT release in which this row's content
was present; NA if still current.
https://evs.nci.nih.gov/ftp1/CDISC/SDTM/
Metadata about all datasets bundled in cdiscdata, including CT
tables and Define-XML file-based assets.
datasets_cataloguedatasets_catalogue
A data frame with columns:
R object name or logical dataset identifier.
One of "CT", "IG", "Model",
"CDASH", "QRS", "Schema", "Stylesheet".
One of "sdtm", "adam", or NA for
non-CT datasets.
Human-readable description.
Human-readable version range string.
Number of distinct versions available.
Most recent version string.
Date this catalogue row was last refreshed.
Accessor over the two CDASH (collection-side) tables,
cdash_model and ig_cdash, with the same
conventions as get_ig: the standard is chosen with
standard and the version defaults to its newest. CDASH is kept apart
from get_ig() because its tables describe case report form
collection (question text, prompts, the SDTM variable each field maps to),
not a dataset's structure, and so have different columns.
get_cdash(standard = "CDASHIG", version = NULL, domain = NULL)get_cdash(standard = "CDASHIG", version = NULL, domain = NULL)
standard |
|
version |
A version string of that standard (e.g. |
domain |
Restrict to one domain (e.g. |
The standards: "CDASH" (the CDASH model, versions 1.0 to 1.3, in
cdash_model) and "CDASHIG" (the CDASH implementation
guide, 1.1 and 2.0 to 2.3, in ig_cdash).
Like the other implementation-guide data these come from CDISC Library CSV
exports that are not part of this package or repository (see
ig_sources); the guides' definitions, CRF completion
instructions, mapping instructions, and implementation notes are not carried.
The collection wording the guides publish (question_text,
prompt) is.
A data frame: the rows of cdash_model or
ig_cdash for that standard, version, and domain. An unknown
standard, version, or domain is a classed error
(cdiscdata_error_ig_standard_unavailable,
cdiscdata_error_ig_version_unavailable,
cdiscdata_error_ig_domain_unavailable).
get_cdash() # newest CDASHIG (2.3) get_cdash("CDASHIG", version = "2.1", domain = "LB") get_cdash("CDASH", domain = "Findings")get_cdash() # newest CDASHIG (2.3) get_cdash("CDASHIG", version = "2.1", domain = "LB") get_cdash("CDASH", domain = "Findings")
Convenience wrapper around get_dataset for CT data.
get_ct(type = c("sdtm", "adam"), version = NULL)get_ct(type = c("sdtm", "adam"), version = NULL)
type |
One of |
version |
CT version date string e.g. |
A data frame of CT terms valid at the requested version.
ct <- get_ct("sdtm") head(ct) ct_2024 <- get_ct("sdtm", version = "2024-09-27") nrow(ct_2024) head(get_ct("adam"))ct <- get_ct("sdtm") head(ct) ct_2024 <- get_ct("sdtm", version = "2024-09-27") nrow(ct_2024) head(get_ct("adam"))
Generic retrieval gateway. For CT datasets, filters to rows valid at the
requested version date. For the implementation-guide, model, CDASH, and QRS
datasets (ig_sdtm, model_sdtm, ig_adam,
cdash_model, ig_cdash, qrs_supplement), returns the
whole table, or the rows whose version column equals version
(across every standard or instrument in it; use get_ig or
get_cdash to pick one standard). For schemas and stylesheets,
returns the file path for the requested Define-XML version. Use
list_datasets to see available dataset names.
get_dataset(name, version = NULL)get_dataset(name, version = NULL)
name |
Dataset name from |
version |
Version string. For CT, |
A data frame (for CT, IG, model, CDASH, and QRS data) or a file path string (for schemas/stylesheets).
ct <- get_dataset("ct_sdtm") head(ct) ct_2024 <- get_dataset("ct_sdtm", version = "2024-09-27") nrow(ct_2024) ig_adam_1_3 <- get_dataset("ig_adam", version = "1.3") nrow(ig_adam_1_3) get_dataset("define_xml_schema", version = "2.1") get_dataset("define_xml_stylesheet", version = "2.0")ct <- get_dataset("ct_sdtm") head(ct) ct_2024 <- get_dataset("ct_sdtm", version = "2024-09-27") nrow(ct_2024) ig_adam_1_3 <- get_dataset("ig_adam", version = "1.3") nrow(ig_adam_1_3) get_dataset("define_xml_schema", version = "2.1") get_dataset("define_xml_stylesheet", version = "2.0")
One accessor over every standard in ig_sdtm,
model_sdtm, and ig_adam, mirroring
get_ct. The standard is chosen with standard; the
version defaults to that standard's newest.
get_ig(standard = "SDTMIG", version = NULL, domain = NULL)get_ig(standard = "SDTMIG", version = NULL, domain = NULL)
standard |
One standard from the list above (default
|
version |
A version string of that standard (e.g. |
domain |
Restrict to one domain or structure. For the
implementation-guide standards in |
The standards, and the dataset each is stored in:
"SDTM" (model versions 1.2 to 2.1): model_sdtm.
"SDTMIG" (3.1.2 to 3.4), "SDTMIG-AP",
"SDTMIG-MD", "SENDIG" (3.0 to 3.1.1),
"SENDIG-AR", "SENDIG-DART", "SENDIG-GeneTox":
ig_sdtm.
"ADaMIG" (1.0 to 1.3), "ADaMIG-MD",
"ADaMIG-NCA", "ADaM-ADAE", "ADaM-BDS-TTE",
"ADaM-OCCDS", "ADaM-popPK": ig_adam.
The lower-case names "sdtm" and "adam", the only values the
first argument took before it named a standard, are kept as aliases for the
defaults "SDTMIG" and "ADaMIG" (note "SDTM" in capitals
is the model, not the implementation guide).
All of this comes from CDISC Library CSV exports that are not part of this
package or repository (see ig_sources for exactly which
files, and data-raw/README.md). Only variable metadata is carried;
the guides' prose (CDISC Notes, Description, Definition, Examples) is not.
A data frame: the rows of ig_sdtm,
model_sdtm, or ig_adam for that standard,
version, and domain. An unknown standard, version, or domain is a classed
error (cdiscdata_error_ig_standard_unavailable,
cdiscdata_error_ig_version_unavailable,
cdiscdata_error_ig_domain_unavailable).
get_ig() # newest SDTMIG (3.4) get_ig("SDTMIG", version = "3.3", domain = "PP") get_ig("SENDIG", domain = "PP") get_ig("ADaMIG", domain = "BDS") get_ig("ADaMIG-NCA") get_ig("SDTM", version = "2.1", domain = "Findings")get_ig() # newest SDTMIG (3.4) get_ig("SDTMIG", version = "3.3", domain = "PP") get_ig("SENDIG", domain = "PP") get_ig("ADaMIG", domain = "BDS") get_ig("ADaMIG-NCA") get_ig("SDTM", version = "2.1", domain = "Findings")
One row per variable of seven ADaM standards, at every version: ADaMIG
(1.0, 1.1, 1.2, 1.3), ADaMIG-MD (1.0), ADaMIG-NCA (1.0), ADaM-ADAE (1.0),
ADaM-BDS-TTE (1.0), ADaM-OCCDS (1.0, 1.1), and ADaM-popPK (1.0); 11 standard
versions in all. Built from CDISC Library CSV exports that are not part of
this package or repository (see ig_sources and
data-raw/README.md); only variable metadata is carried, not the
guides' prose. Use get_ig to retrieve a standard, and
build_domain_spec to build an ADPP variable spec from it
(ADPP is a Basic Data Structure dataset; ADaMIG-NCA extends it).
ig_adamig_adam
A data frame with columns:
The standard, e.g. "ADaMIG" or
"ADaMIG-NCA".
The standard's version, e.g. "1.3".
The data structure, as named in the export, e.g.
"Basic Data Structure" or "Subject-Level Analysis
Dataset" (ADSL).
The variable set within the structure, e.g.
"Timing".
Row order within the export for that standard version.
Variable name, e.g. "AVAL".
Variable label. At most 40 characters except
PBCHGCyN in ADaMIG 1.2 and 1.3, which the guide publishes at 41.
"Char" or "Num".
Core designation ("Req", "Perm",
"Cond", ...).
CDISC CT codelist C-code(s) the variable uses;
several are separated by "; ". NA when none.
The codelist submission value(s), where the export gives them.
A described value domain, where the variable has one rather than a codelist.
A fixed list of allowed values, where there is one.
A (standard, version, structure, variable_set, variable) is unique: the
variable set is part of the key because ADaM-OCCDS defines DECDORGw
twice, once for each dictionary-specific variable set, with different
labels.
CDISC Library CSV exports, downloaded under CDISC's terms and not
redistributed; see data-raw/README.md.
One row per variable of every domain and data collection scenario of the
CDASH implementation guide (CDASHIG), at every version: 1.1, 2.0, 2.1, 2.2,
and 2.3. Built from CDISC Library CSV exports not redistributed with this
package (see ig_sources); only variable metadata and the
collection wording (question text, prompt) is carried, not the guide's
definitions, CRF completion instructions, mapping instructions, or
implementation notes. Retrieve it with get_cdash.
ig_cdashig_cdash
A data frame with columns:
Always "CDASHIG".
Guide version, e.g. "2.3".
General observation class, e.g. "Findings".
Domain, e.g. "LB".
The data collection scenario or implementation option
the row belongs to (e.g. "Local Processing"), or NA for
variables common to the domain.
Position within the domain and scenario, as published.
CDASHIG variable name, e.g. "LBORRES".
Variable label. Not published in version 1.1 (NA
for all of its rows); at most 40 characters except for 71 labels in
version 2.0, which the guide publishes longer.
The CRF question text the guide suggests.
The CRF field prompt the guide suggests.
As published: "Char", "Num",
"Date (dd-MON-yyyy)", or "Time (24 hour)".
CDASHIG Core designation, as published: "HR" (highly
recommended), "R/C" (recommended or conditional), or "O"
(optional).
The SDTMIG variable the collected value maps to.
The CDISC CT codelist C-code(s) or subset code(s)
the variable uses; NA when none.
The codelist submission value, where the export gives one.
A (standard, version, domain, scenario, variable) is unique.
CDISC Library CSV exports, downloaded under CDISC's terms and not
redistributed; see data-raw/README.md.
One row per variable of every domain of seven implementation-guide
standards, at every version: SDTMIG (3.1.2, 3.1.3, 3.2, 3.3, 3.4),
SDTMIG-AP (1.0), SDTMIG-MD (1.0, 1.1), SENDIG (3.0, 3.1, 3.1.1),
SENDIG-AR (1.0), SENDIG-DART (1.1), and SENDIG-GeneTox (1.0); 14 standard
versions in all. Built from CDISC Library CSV exports that are not part of
this package or repository (see ig_sources and
data-raw/README.md); only variable metadata is carried, not the
guides' prose. Use get_ig to retrieve a standard, and
build_domain_spec to build a ready-to-use PP/SUPPPP/ADPP
variable spec from it. The SDTM model itself is in
model_sdtm.
ig_sdtmig_sdtm
A data frame with columns:
The standard, e.g. "SDTMIG" or "SENDIG-AR".
The standard's version, e.g. "3.4".
General observation class, e.g. "Findings".
Domain, e.g. "PP", "LB", "SUPPQUAL".
Position within the domain, as published.
Variable name, e.g. "PPTESTCD".
Variable label. At most 40 characters except for 22 labels the guides themselves publish longer (see the data-integrity tests).
"Char" or "Num".
CDISC variable role, e.g. "Topic".
Core designation ("Req", "Exp",
"Perm", "Cond", or the published "Not used").
CDISC CT codelist C-code(s) the variable uses, as
published; several are separated by "; " (e.g. PPORRESU lists
PKUNIT and four normalized-unit codelists). NA when none.
The codelist submission value(s),
where the export gives them (the SEND guides do; the SDTMIG exports do
not, so look the code up in get_ct).
A described value domain such as
"ISO 8601", where the variable has one rather than a codelist.
A fixed list of allowed values, e.g. the domain
abbreviation for DOMAIN.
A (standard, version, domain, variable) is unique.
CDISC Library CSV exports, downloaded under CDISC's terms and not
redistributed; see data-raw/README.md.
One row per export file read by data-raw/build_ig.R, so which
standard versions are bundled, and from exactly which files, is itself
data. The files are not part of this package or repository.
ig_sourcesig_sources
A data frame with 52 rows (34 implementation-guide and model exports, 9 CDASH, 9 QRS supplements) and columns:
The export's file name.
The export's Version value, e.g.
"ADaMIG MD v1.0"; NA for the QRS supplements, whose
exports have none.
The canonical standard name parsed from the version string (for a QRS supplement, the instrument parsed from the file name).
The version number parsed from the version string (for a QRS supplement, from the file name).
The dataset it was loaded into: "ig_sdtm",
"model_sdtm", "ig_adam", "cdash_model",
"ig_cdash", or "qrs_supplement".
Data rows in the file, equal to the rows loaded from it.
MD5 checksum of the file, to tell whether a rebuild used the same export.
CDISC Library CSV exports; see data-raw/README.md.
List all available datasets in cdiscdata
list_datasets()list_datasets()
A data frame with one row per dataset describing its type, version range, and latest available version.
list_datasets()list_datasets()
One row per variable of the CDISC SDTM model, at every version: 1.2, 1.3,
1.4, 1.5, 1.6, 1.7, 1.8, 2.0, and 2.1. Built from CDISC Library CSV exports
not redistributed with this package (see ig_sources); only
variable metadata is carried, not the model's descriptions, definitions,
notes, or examples. Retrieve it with get_ig("SDTM").
model_sdtmmodel_sdtm
A data frame with columns:
Always "SDTM".
Model version, e.g. "2.1".
Observation class or dataset class, e.g.
"Findings", "Trial Design".
Dataset name, or NA for class-level variables.
Position within the class/dataset, as published.
Variable name, e.g. "--TESTCD".
Variable label. "--TESTCD" is published at 46
characters in model versions 1.2 to 1.6.
"Char" or "Num".
CDISC variable role.
A described value domain, e.g.
"ISO 8601"; sparse before version 2.0.
The variable(s) this one qualifies.
Usage restrictions on the variable; version
2.0 and later, NA before.
The variable's NCI C-code; version 2.0 and later,
NA before.
A (standard, version, class, dataset, variable) is unique. dataset
is NA for the general-observation-class variables (Events,
Findings, ...), which are defined once per class with a -- prefix,
and set for the datasets the model defines outright (e.g. "DM").
CDISC Library CSV exports, downloaded under CDISC's terms and not
redistributed; see data-raw/README.md.
One row per item of each of nine questionnaire, rating-scale, and
functional-test (QRS) instrument supplements: AIMS (2.0), APACHE_II (1.0),
ATLAS (1.0), CGI (2.1), HAM-A (2.1), KFSS (2.0), KPS_SCALE (2.0), PGI (1.1),
and SIX_MINUTE_WALK (1.0). Built from CDISC Library CSV exports not
redistributed with this package (see ig_sources); only the
identifiers that map an item to SDTM controlled terminology are carried,
not the item text. Reach it with get_dataset("qrs_supplement").
qrs_supplementqrs_supplement
A data frame with columns:
The instrument, as in the file name, e.g.
"HAM-A", "SIX_MINUTE_WALK".
The supplement's version, e.g. "2.1".
Position of the item within the instrument.
The item's --TEST value, e.g.
"AIMS01-Muscles of Facial Expression"; at most 40 characters.
C-code of the --TESTCD codelist for
the instrument.
The item's --TESTCD term C-code.
C-code of the --TEST codelist for the
instrument.
The item's --TEST term C-code.
The response (value list) group the item uses, or
NA for the few items that have none.
The exports have no Version column; instrument and
version are taken from the file name (HAM-A_Supplement_v2.1.csv).
A (instrument, version, item_order) is unique.
CDISC Library CSV exports, downloaded under CDISC's terms and not
redistributed; see data-raw/README.md.
Get path to a Define-XML XSD schema file
schema_path(define_version = c("2.1", "2.0"))schema_path(define_version = c("2.1", "2.0"))
define_version |
One of |
Full file path to the primary XSD file.
schema_path("2.1") schema_path("2.0")schema_path("2.1") schema_path("2.0")
Get path to a Define-XML XSLT stylesheet
stylesheet_path(define_version = c("2.1", "2.0"))stylesheet_path(define_version = c("2.1", "2.0"))
define_version |
One of |
Full file path to the XSL stylesheet.
stylesheet_path("2.1") stylesheet_path("2.0")stylesheet_path("2.1") stylesheet_path("2.0")