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:
-
The FILENAME statement
assigns the file reference Xmlout to the physical location of the
output XML document.
-
The PROC CDISC statement
specifies the following:
-
-
File reference Xmlout, which references
the physical location of the output XML document to be exported.
-
The ODM statement includes
the DATA= argument to reference the SAS data set Current.ODM, which
stores the CDISC ODM version and file type.
-
The STUDY statement
includes the DATA= argument to reference the SAS data set Current.Study,
which stores the study identifier.
-
The GLOBALVARIABLES
statement includes the DATA= argument to reference the SAS data set
Current.Globals, which stores general summary information about the
study.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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;