Previous Page | Next Page

Importing and Exporting a CDISC ODM XML Document

Specifying CDISC ODM Metadata Attributes


Introduction to CDISC ODM Metadata Attributes

Several CDISC procedure statements enable you to specify metadata attributes either directly in the CDISC procedure statement or stored in a SAS data set that you reference in the DATA= argument.

The DATA= argument enables you to use the same execution code for all operations. It also enables you to change the metadata and data content by redirecting the LIBNAME statement specifications to different locations, perhaps on a study basis.

Here is an example of an ODM statement that specifies metadata attributes as part of the statement syntax:

odm odmversion="1.2"
   fileoid="000-00-0000"
   filetype=SNAPSHOT
   description="Adverse events from the CTChicago file";

The following example references those same metadata attributes stored in a SAS data set:

odm data=current.odm;

The SAS DATA step code shows how CURRENT.ODM, which contains the metadata attributes, is created:

data current.odm;
    odmversion="1.2";
    fileoid="000-00-0000";
    filetype="SNAPSHOT";
    description="Adverse events from the CTChicago file";
run;

The following example illustrates how the same PROC CDISC code can be used to export data for many studies:

libname metadata 'c:\your-meta-library';

libname clindata 'c:\your-data-library';

filename xmlout 'c:\your-output\ae.xml';

proc cdisc model=odm write=xmlout;
   odm data=metadata.odm;
   study data=metadata.study;
   globalvariables data=metadata.globals;
   basicdefinitions data=metadata.basic;
   metadataversion data=metadata.metadata;
   presentation data=metadata.present;
   user data=metadata.users;
   location data=metadata.location;
   signature data=metadata.signature;
   clinicaldata data=clindata.ae;
run;


Specifying CDISC ODM Metadata Attributes When Importing

When importing a CDISC ODM XML document, you can specify the metadata attribute for the version number either directly in the ODM statement or stored in a SAS data set that you reference in the DATA= argument.

The following example imports data from a CDISC ODM ItemGroupDef element that has a SASDatasetName= attribute value of AE. All KeySet members are written to the output SAS data set named MY.AE. A maximum OID length of 16 characters is allocated for each KeySet member. The metadata attribute for the ODM statement is specified in the statement.

filename xmlinp 'CDISC-ODM-XML-document';

proc cdisc model=odm read=xmlinp formatactive=yes formatnoreplace=no;
    odm odmversion="1.2" odmmaximumoidlength=16 odmminimumkeyset=no;
    clinicaldata out=my.ae sasdatasetname="AE";
run;


Specifying CDISC ODM Metadata Attributes When Exporting

When exporting a CDISC ODM XML document, follow these conventions:

Previous Page | Next Page | Top of Page