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 attributes for the version 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 attributes 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 ODM, STUDY, GLOBALVARIABLES, and METADATAVERSION statements 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 BASICDEFINITIONS, PRESENTATION, USER, LOCATION, and SIGNATURE statements must be stored in a SAS data set that you reference in the DATA= argument.