CDISC Procedure Examples for CDISC ODM |
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 warnings in the SAS log.
Program |
The following SAS program imports the XML document as a SAS data set:
The LIBNAME statement assigns the libref RESULTS to the physical location of the output SAS data set.
The FILENAME statement assigns the fileref XMLINP to the physical location of the input XML document (complete pathname, filename, and file extension) to be imported.
The PROC CDISC statement specifies the following:
CDISC ODM as the model.
Fileref XMLINP, which references the physical location of the input XML document to be imported.
ORDERNUMBER=YES in the ODM statement specifies to validate whether OrderNumber attributes conform to the model specifications. This is the default setting for ORDERNUMBER=
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 begins, which is AE.
libname results 'C:\myfiles\'; 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.
238 libname results 'C:\myfiles\'; NOTE: Libref RESULTS was successfully assigned as follows: Engine: V9 Physical Name: C:\myfiles\ 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
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.