Exporting a CDISC ODM XML Document with Required and Optional Statements

Overview

This example includes required and optional PROC CDISC statements for exporting a CDISC ODM XML document. The example specifies 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.
  • You must submit metadata attributes for the optional BASICDEFINITIONS, PRESENTATION, USER, LOCATION, and SIGNATURE statements in SAS data sets referenced in the DATA= argument.
  • You must specify optional metadata attributes for the required CLINICALDATA statement 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 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;
Then, reference the SAS data sets in PROC CDISC statements:
  1. The FILENAME statement assigns the file reference Xmlout to the physical location of the output XML document.
  2. The PROC CDISC statement specifies the following:
    • CDISC ODM as the model.
    • File reference Xmlout, which references the physical location of the output XML document to be exported.
  3. The ODM statement includes the DATA= argument to reference the SAS data set Current.ODM, which stores the CDISC ODM version and file type.
  4. The STUDY statement includes the DATA= argument to reference the SAS data set Current.Study, which stores the study identifier.
  5. The GLOBALVARIABLES statement includes the DATA= argument to reference the SAS data set Current.Globals, which stores general summary information about the study.
  6. The 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.
  7. The METADATAVERSION statement includes the DATA= argument to reference the SAS data set Current.Metadata, which stores the metadata version and version name that are used by the study.
  8. The 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.
  9. The USER statement includes the DATA= argument to reference the SAS data set Current.User, which stores information about users who are involved in the study.
  10. The LOCATION statement includes the DATA= argument to reference the SAS data set Current.Location, which stores information about the physical location of the study.
  11. The SIGNATURE statement includes the DATA= argument to reference the SAS data set Current.Signature, which stores information about the signatures that are required for administering the study.
  12. The 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;