CDISC Procedure Examples for CDISC ODM |
Overview |
This example includes required and optional PROC CDISC statements for exporting a CDISC ODM XML document. The example illustrates how to specify metadata attributes that are stored in SAS data sets and referenced in the DATA= argument.
When exporting, the following requirements apply:
You can specify metadata attributes for the required ODM, STUDY, GLOBALVARIABLES, and METADATAVERSION statements either directly in the CDISC procedure statement or stored in a SAS data set.
Metadata attributes for the optional BASICDEFINITIONS, PRESENTATION, USER, LOCATION, and SIGNATURE statements must be submitted in SAS data sets referenced in the DATA= argument.
Optional metadata attributes for the required CLINICALDATA statement must be specified as part of the CLINICALDATA statement syntax.
Program |
First, this example uses the SAS data sets that contain metadata attributes for the required ODM, STUDY, GLOBALVARIABLES, and METADATAVERSION statements from Example: Exporting a CDISC ODM XML Document with Metadata Attributes in SAS Data Sets.
Create additional SAS data sets that contain metadata attributes for the optional BASICDEFINITIONS, PRESENTATION, USER, LOCATION, and SIGNATURE statements. The LIBNAME statement assigns the libref CURRENT to the physical location of the SAS data sets that will store the metadata attributes.
libname current 'C:\mydata\'; data current.basic; length TranslatedText $40.; MeasurementOID="MU.KG"; Name="Kilogram"; Lang="en"; TranslatedText="English: Kilogram"; output; MeasurementOID="MU.KG"; Name="Kilogram"; Lang="sp"; TranslatedText="Spanish: Kilogram"; output; MeasurementOID="MU.LB"; Name="Pound"; Lang="en"; TranslatedText="English: Pound"; output; MeasurementOID="MU.LB"; Name="Pound"; Lang="sp"; TranslatedText="Spanish: Libra"; output; run; data current.present; length TranslatedText $40.; PresentationOID="PRES.EN"; Lang="en"; TranslatedText="English: Presentation"; output; PresentationOID="PRES.SP"; Lang="sp"; TranslatedText="Spanish: Presentation"; output; run; data current.location; LocationOID="LOC.CDISCHome"; Name="CDISC Headquarters"; Studyoid="123-456-789"; MetadataversionOID="v1.1.0"; EffectiveDate="2001-10-19"; LocationType="Other"; output; LocationOID="LOC.site001"; Name="Roswell Park"; StudyOID="123-456-789"; MetadataversionOID="v1.1.0"; EffectiveDate="2001-10-19"; LocationType="Site"; output; run; data current.user; length usertype $20.; length organization $40.; UserOID="USR.cdisc001"; UserType="Other"; FullName="Fred Flintstone"; FirstName="Fred"; LastName="Flintstone"; Organization = "CDISC"; LocationOID="LOC.CDISCHome"; StreetName="123 Main Street"; City="Washington"; StateProv="DC"; Country="United States"; PostalCode=""; output; UserOID="USR.inv001"; UserType="Investigator"; FullName="Wilma Flintstone"; FirstName="Wilma"; LastName="Flintstone"; Organization="Roswell Park"; LocationOID="LOC.site001"; StreetName=""; City=""; StateProv=""; Country=""; PostalCode=""; output; run; data current.signature; SignatureOID="SD.cdisc001-es"; Methodology="Electronic"; Meaning="Signature Meaning"; LegalReason="LegalReason"; run;
Reference the SAS data sets in a PROC CDISC program:
The FILENAME statement assigns the fileref XMLOUT to the physical location of the output XML document.
The required PROC CDISC statement specifies CDISC ODM as the model and the fileref XMLOUT, which references the physical location of the output XML document.
The required ODM statement includes the DATA= argument to reference the SAS data set CURRENT.ODM, which stores the CDISC ODM version and file type.
The required STUDY statement includes the DATA= argument to reference the SAS data set CURRENT.STUDY, which stores the study identifier.
The required GLOBALVARIABLES statement includes the DATA= argument to reference the SAS data set CURRENT.GLOBALS, which stores general summary information about the study.
The optional BASICDEFINITIONS statement includes the DATA= argument to reference the SAS data set CURRENT.BASIC, which stores information about measurement units that are used in the study.
The required METADATAVERSION statement includes the DATA= argument to reference the SAS data set CURRENT.METADATA, which stores the metadata version and version name.
The optional PRESENTATION statement includes the DATA= argument to reference the SAS data set CURRENT.PRESENT, which stores information about how the study is presented to users.
The optional USER statement includes the DATA= argument to reference the SAS data set CURRENT.USER, which stores information about users involved in the study.
The optional LOCATION statement includes the DATA= argument to reference the SAS data set CURRENT.LOCATION, which stores information about the physical location of the study.
The optional SIGNATURE statement includes the DATA= argument to reference the SAS data set CURRENT.SIGNATURE, which stores information about the signatures required in administering the study.
The required CLINICALDATA statement identifies the input SAS data set, which is CURRENT.AE. The input SAS data set contains the data content and KeySet members that are written to the XML document. In addition, the CLINICALDATA statement specifies optional metadata attributes.
filename xmlout 'C:\XML\aeopts.xml'; 1 proc cdisc model=odm write=xmlout; 2 odm data=current.odm; 3 study data=current.study; 4 globalvariables data=current.globals; 5 basicdefinitions data=current.basic; 6 metadataversion data=current.metadata; 7 presentation data=current.present; 8 user data=current.user; 9 location data=current.location; 10 signature data=current.signature; 11 clinicaldata data=current.ae 12 domain="AE" name = "Adverse Events" comment = "Adverse Events in the Clinical Trial"; run; filename xmlout clear;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.