Importing a CDISC ODM XML Document with OrderNumber Attributes

Overview

This example imports a CDISC ODM XML document that contains OrderNumber attributes that are not in sequence. PROC CDISC validates the attributes and displays a warning in the SAS log.

Program

The following SAS program imports the XML document as a SAS data set:
  1. The LIBNAME statement assigns the libref Results to the physical location of the output SAS data set.
  2. The FILENAME statement assigns the file reference Xmlinp to the physical location of the input XML document (complete pathname, filename, and file extension) to be imported.
  3. The PROC CDISC statement specifies the following:
    • CDISC ODM as the model.
    • File reference Xmlinp, which references the physical location of the input XML document to be imported.
  4. ORDERNUMBER=YES in the ODM statement specifies to validate whether OrderNumber attributes conform to the model specifications. This is the default setting for ORDERNUMBER=.
  5. The CLINICALDATA statement identifies the output SAS data set (which is Results.AE) and specifies the CDISC ODM ItemGroupDef attribute that indicates where the data content in the XML document (which is AE) begins.
libname Results 'C:\My Documents\'; 1

filename Xmlinp 'C:\XML\AE.xml'; 2

proc cdisc model=odm read=Xmlinp; 3
   odm odmversion="1.2" ordernumber=yes; 4
   clinicaldata out=Results.AE sasdatasetname="AE"; 5
run;

filename Xmlinp clear;

libname Results clear;

Output

The following SAS log displays a warning that the ItemRef element contains an OrderNumber attribute that is out of sequence.
Out-of-Sequence Warning in the SAS Log
238  libname Results 'C:\My Documents\';
NOTE: Libref RESULTS was successfully assigned as follows:
      Engine:        V9
      Physical Name: C:\My Documents\
239
240  filename Xmlinp 'C:\XML\AE.xml';
241
242  proc cdisc model=odm read=Xmlinp;
243     odm odmversion="1.2" ordernumber=yes;
244     clinicaldata out=Results.AE sasdatasetname="AE";
245  run;

WARNING: ItemRef OID="ID.AESEV" OrderNumber="21" outside range. Ignoring
OrderNumber.
NOTE: PROCEDURE CDISC used (Total process time):
      real time           4.76 seconds
      cpu time            0.01 seconds