The current
SAS Clinical Standards Toolkit release supports the reading of portions
of an odm.xml file. It supports the translation of only the metadata
(<Study>) and clinical data (<ClinicalData>) sections
of the file into a SAS representation of the file content.
In order
to read an odm.xml file, a specialized macro named odm_read is available
in the ODM 1.3.0 standards macro folder. (For SAS 9.2, this folder
is located at
<global standards
library directory>/standards/cdisc-odm-1.3.0-1.3/macros
.) This macro is referenced from the create_sasodm_fromxml.sas driver
program (described more fully below). There are no input parameters
in the call to the odm_read macro. File references and other metadata
that are required by the macro are set as global macro variable values.
Currently, those global macro variable values are set through the
framework initialization properties and the CDISC ODM 1.3.0 initialization
properties. Throughout the processing of the odm_read macro, the Results
data set contains all framework and ODM 1.3.0 specific messages generated
during run time.
Based
on file references from the SASReferences data set, odm_read accesses
the odm.xml file.
The following
is a partial listing of the sample odm.xml file.
<?xml version="1.0" encoding="ISO-8859-1"?>
<ODM
xmlns="http://www.cdisc.org/ns/odm/v1.3"
FileOID="Study1234"
ODMVersion="1.3"
FileType="Snapshot"
CreationDateTime="2004-07-28T12:34:13-06:00"
SourceSystem="ss00"
AsOfDateTime="2004-07-29T12:34:13-06:00"
Granularity="SingleSite"
Description="Study to determine existence of ischemic stroke"
Archival="Yes"
PriorFileOID="Study-4321"
Originator="SAS Institute"
SourceSystemVersion="Version 0.0.0"
Id="DSSignature123">
<Study OID="1234">
<GlobalVariables>
<StudyName>1234</StudyName>
<StudyDescription>1234 Data Definition</StudyDescription>
<ProtocolName>1234</ProtocolName>
</GlobalVariables>
<BasicDefinitions>
<MeasurementUnit Name="My Unit" OID="MU_0001">
<Symbol>
<TranslatedText xml:lang="enus">Hello there text</TranslatedText>
</Symbol>
</MeasurementUnit>
<MeasurementUnit Name="My Other Unit" OID="MU_0002">
<Symbol>
<TranslatedText xml:lang="jpn">Bye there text</TranslatedText>
</Symbol>
</MeasurementUnit>
</BasicDefinitions>
<MetaDataVersion OID="CDISC.SDTM.3.1.0"
Name="Study 1234, Data Definitions"
Description="Study 1234, Data Definitions">
<Include StudyOID="1234"
MetaDataVersionOID="MDV000">
</Include>
<Protocol>
<Description>
After
the odm_read macro confirms that the odm.xml file exists, a call is
made to the SAS DATA step component JavaObj. In SAS 9.1.3, you get
a warning in the log that states that JavaObj is experimental. JavaObj
processing converts the odm.xml file into the cubeXML file through
transformations using XSL files and processes. The cubeXML file is
created in the Work library. The name of the cubeXML file is
_cubnnnn.xml
,
where
nnnn
is a randomly generated number. The cubeXML file is accessed using
the SAS XML LIBNAME engine and XMLMAP processing. A default XMLMAP
file is stored in the sample ODM 1.3.0 study folder hierarchy under
/referencexml
as odm.map. The odm.map file is required
to process the cubeXML file. If it does not exist, then the odm_read
macro attempts to create one using the ODM reference metadata.
The following
is a partial listing of the odm.map file.
<?xml version="1.0" encoding="windows-1252"?>
<SXLEMAP version="1.2">
<TABLE name="Annotations">
<TABLE-PATH syntax="XPath">/LIBRARY/Annotations</TABLE-PATH>
<TABLE-DESCRIPTION>Annotations associated with data</TABLE-DESCRIPTION>
<COLUMN name="ID">
<PATH syntax="Xpath">/LIBRARY/Annotations/ID</PATH>
<TYPE>character</TYPE>
<DATATYPE>character</DATATYPE>
<DESCRIPTION>Unique ID for a specific Annotation element</DESCRIPTION>
<LENGTH>128</LENGTH>
</COLUMN>
<COLUMN name="SeqNum">
<PATH syntax="Xpath">/LIBRARY/Annotations/SeqNum</PATH>
<TYPE>numeric</TYPE>
<DATATYPE>numeric</DATATYPE>
<DESCRIPTION>Uniquely identifies the annotation within its parent
entity</DESCRIPTION>
<LENGTH>8</LENGTH>
</COLUMN>
<COLUMN name="Comment">
<PATH syntax="Xpath">/LIBRARY/Annotations/Comment</PATH>
<TYPE>character</TYPE>
<DATATYPE>character</DATATYPE>
<DESCRIPTION>Free-text (uninterpreted) comment about clinical data</DESCRIPTION>
<LENGTH>2000</LENGTH>
</COLUMN>
<COLUMN name="SponsorOrSite">
<PATH syntax="Xpath">/LIBRARY/Annotations/SponsorOrSite</PATH>
<TYPE>character</TYPE>
<DATATYPE>character</DATATYPE>
<DESCRIPTION>Comment source (Sponsor | Site)</DESCRIPTION>
<LENGTH>2000</LENGTH>
</COLUMN>
<COLUMN name="FlagType">
<PATH syntax="Xpath">/LIBRARY/Annotations/FlagType</PATH>
<TYPE>character</TYPE>
<DATATYPE>character</DATATYPE>
<DESCRIPTION>Type of flag</DESCRIPTION>
<LENGTH>2000</LENGTH>
</COLUMN>
<COLUMN name="FlagValue">
When the
cubeXML is processed, the data sets (such as ItemDefs) that are included
in the SAS representation of the CDISC ODM model are derived. The
final step for the odm_read macro is the derivation of table and column
metadata that describe the data sets in the SAS representation of
the odm.xml file. At this point, the odm_read macro is ready to create
the source_tables and source_columns data sets. The tables in the
source_tables data sets are created and copied to the output library
as defined in the SASReferences data set.