| Title: | Generate CDISC Define-XML from Metacore Objects |
|---|---|
| Description: | Generates CDISC Define-XML documents (versions 2.0 and 2.1) from metacore metadata objects. Maps dataset, variable, codelist, and derivation information into an ODM-based Define-XML structure suitable for further review and regulatory use. Integrates with the pharmaverse metacore ecosystem. |
| Authors: | Shakhar Eranna Chalwadi [aut, cre] |
| Maintainer: | Shakhar Eranna Chalwadi <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-11-05 01:30:15 UTC |
| Source: | https://github.com/cran/definecore |
Generates a CDISC Define-XML (version 2.0 or 2.1) document from a
metacore metadata object. The output is an ODM-based XML file
containing dataset (ItemGroupDef), variable (ItemDef), codelist, and
derivation (MethodDef) metadata suitable as a starting point for
regulatory submissions.
write_define_xml( meta, file, define_version = c("2.1", "2.0"), study_oid = NULL, study_name = "STUDY", study_description = "Study Description", protocol_name = study_name, standard_name = NULL, standard_version = NULL, file_oid = NULL, origin_default = "Derived", quiet = FALSE )write_define_xml( meta, file, define_version = c("2.1", "2.0"), study_oid = NULL, study_name = "STUDY", study_description = "Study Description", protocol_name = study_name, standard_name = NULL, standard_version = NULL, file_oid = NULL, origin_default = "Derived", quiet = FALSE )
meta |
A |
file |
Character string. Path to the output |
define_version |
Character. |
study_oid |
Character. ODM Study OID. Default generated. |
study_name |
Character. Study name for GlobalVariables. |
study_description |
Character. Study description. |
protocol_name |
Character. Protocol name. Defaults to |
standard_name |
Character. Name of the content standard (e.g., |
standard_version |
Character. Version of the content standard. |
file_oid |
Character. ODM FileOID. Default generated. |
origin_default |
Character. Default origin if missing (e.g., |
quiet |
Logical. Suppress messages. Default |
Invisibly returns the path to the written file.
library(metacore) load(metacore_example("pilot_ADaM.rda")) # loads object named 'metacore' tmp <- tempfile(fileext = ".xml") write_define_xml(metacore, tmp, study_name = "CDISCPILOT01") unlink(tmp)library(metacore) load(metacore_example("pilot_ADaM.rda")) # loads object named 'metacore' tmp <- tempfile(fileext = ".xml") write_define_xml(metacore, tmp, study_name = "CDISCPILOT01") unlink(tmp)