Importing and Exporting a CDISC ODM XML Document |
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:
You can specify metadata attributes for the required statements ODM, STUDY, GLOBALVARIABLES, and METADATAVERSION either directly in the statement or stored in a SAS data set that you reference in the DATA= argument.
Note: You cannot store some metadata attributes in a SAS data set, and also specify other metadata attributes in the statement. If you use a SAS data set, you must store all metadata attributes in the SAS data set.
Optional metadata attributes for the CLINICALDATA statement must be specified as part of the statement syntax. For example, in the following code, the SAS data set MY.AE contains the KeySet members and clinical data content. DOMAIN=, NAME=, and COMMENT= are optional export metadata attributes.
clinicaldata data=my.AE domain="AE" name="Adverse Events" comment="All adverse events in this trial";
Metadata attributes for the optional statements BASICDEFINITIONS, PRESENTATION, USER, LOCATION, and SIGNATURE must be submitted in a SAS data set that you reference in the DATA= argument.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.