Importing and Validating a CDISC ODM XML File

Overview

The SAS Clinical Standards Toolkit supports the currently published CDISC ODM 1.3.0 and 1.3.1 standards, which facilitate the archival and interchange of metadata and data for clinical research. The SAS Clinical Standards Toolkit can import an ODM XML file into a SAS data set representation of the ODM 1.3.0 or 1.3.1 standard.

Assumption

You have an ODM XML file (which is not created by this process) from which a SAS representation has to be created.

Location of ODM Driver Programs

The ODM driver programs are located in the sample study library directory/cdisc-odm-1.3.1-1.6/programs directory.

Step 1: Validate the ODM XML File against the ODM 1.3.1 XML Schema

The initial task is to validate the ODM XML file against the ODM 1.3.1 XML schema. This involves verifying that the ODM XML file is valid structurally and syntactically according to the XML schema. The sample driver create_sasodm_fromxml.sas, modified to point to your specific ODM XML file, contains a call to the cstutilxmlvalidate macro to perform validation.
Here is a sample Results data set produced by the schema validation process:
Partial Sample Results Data Set (CDISC ODM 1.3.1 Schema Validation Process)
Partial Sample Results Data Set (CDISC ODM 1.3.1 Schema Validation Process)
This Results data set provides process information and the location of the ODM XML file . The Results data set confirms that the ODM XML file validated successfully.
Here is a sample Results data set that shows schema validation issues with an ODM XML file:
Partial Sample Results Data Set (CDISC ODM 1.3.1 Schema Validation Process) – Invalid ODM XML File
Partial Sample Results Data Set (CDISC ODM 1.3.1 Schema Validation Process) – Invalid ODM XML File
Running the odm_xmlvalidate macro is not required to import an ODM XML file. However, importing an invalid ODM XML file can result in an incomplete import because the odm_read macro ignores elements and attributes in the ODM XML file that are not defined by the XML schema.

Step 2: Import the ODM XML File

The next step is to import the ODM XML file by calling the odm_read macro, which results in 76 SAS data sets describing the CDISC ODM 1.3.1 data model. The odm_read macro is called by the sample driver create_sasodm_fromxml.sas.
Here is a sample Results data set. It provides process information and the location of the imported ODM XML file. The Results data set confirms that no problems were found with the import. And, the Results data set shows that format catalogs and data sets have been created.
Partial Sample Results Data Set (CDISC ODM 1.3.1 Read Process)
Partial Sample Results Data Set (CDISC ODM 1.3.1 Read Process)

Step 3: Validate the SAS Representation of the ODM XML File

The next step is to validate the SAS representation of the ODM XML standard. In step 1, the ODM XML file was validated against the XML schema. Validating the SAS representation of the ODM XML standard goes further than XML schema validation.
An example of a check that is part of the validation of the SAS representation is the assessment of foreign key relationships across data sets. The SAS Clinical Standards Toolkit provides a sample driver program, validate_odm_data.sas, which validates the SAS representation of an ODM XML file.
Submit the modified driver program. The SAS Clinical Standards Toolkit validation processes generally create two output files: validation results and validation metrics. The names and locations of these SAS data sets depend on your SASReferences specifications for results management.
Here is a sample Results data set produced by the validation process:
Partial Sample Results Data Set (CDISC ODM 1.3.1 Validation Process)
Partial Sample Results Data Set (CDISC ODM 1.3.1 Validation Process)
In this example, there are several issues in the foreign key relationships across data sets.

Step 4: Extract Domain Data from the ODM XML File

The final step is to extract domain data from the ODM XML file by calling the odm_extractdomaindata macro. The odm_extractdomaindata macro extracts one or more data sets from the ClinicalData or ReferenceData sections of the ODM XML file.
The odm_extractdomaindata macro is called by the sample driver extract_domaindata.sas (extract one domain) or by the sample driver extract_domaindata_all.sas (extract all domains).
Here is an example of the extracted AE data set:
Example Extracted AE Data Set
Example Extracted AE Data Set