The following example
demonstrates generating SAS PROC SQL code for the CDISC SDTM AE domain:
libname sdtm32 'c:\cstSampleLibrary\cdisc-sdtm-3.2-1.7\sascstdemodata\data';
%let _cstColumnDef=;
%cstutilsqlcolumndefinition(_cstSourceDS=sdtm32.ae,_cstSQLColDef=_cstColumnDef,
_cstSQLType=SAS);
%put &=_cstColumnDef;
The %CSTUTILSQLGENERATETABLE
macro populates the &_cstColumnDef macro variable with the following
SAS PROC SQL column description values:
_CSTCOLUMNDEF=(
STUDYID char(40) label="Study Identifier",
DOMAIN char(8) label="Domain Abbreviation",
USUBJID char(40) label="Unique Subject Identifier",
AESEQ numeric label="Sequence Number",
AEGRPID char(40) label="Group ID",
AEREFID char(40) label="Reference ID",
AESPID char(40) label="Sponsor-Defined Identifier",
AETERM char(200) label="Reported Term for the Adverse Event",
AEMODIFY char(200) label="Modified Reported Term",
AELLT char(100) label="Lowest Level Term",
AELLTCD numeric label="Lowest Level Term Code",
AEDECOD char(200) label="Dictionary-Derived Term",
AEPTCD numeric label="Preferred Term Code",
AEHLT char(100) label="High Level Term",
AEHLTCD numeric label="High Level Term Code",
AEHLGT char(100) label="High Level Group Term",
AEHLGTCD numeric label="High Level Group Term Code",
AECAT char(40) label="Category for Adverse Event",
AESCAT char(40) label="Subcategory for Adverse Event",
AEPRESP char(2) label="Pre-Specified Adverse Event",
AEBODSYS char(80) label="Body System or Organ Class",
AEBDSYCD numeric label="Body System or Organ Class Code",
AESOC char(80) label="Primary System Organ Class",
AESOCCD numeric label="Primary System Organ Class Code",
AELOC char(40) label="Location of Event",
AESEV char(20) label="Severity/Intensity",
AESER char(2) label="Serious Event",
AEACN char(40) label="Action Taken with Study Treatment",
AEACNOTH char(200) label="Other Action Taken",
AEREL char(40) label="Causality",
AERELNST char(40) label="Relationship to Non-Study Treatment",
AEPATT char(20) label="Pattern of Adverse Event",
AEOUT char(40) label="Outcome of Adverse Event",
AESCAN char(2) label="Involves Cancer",
AESCONG char(2) label="Congenital Anomaly or Birth Defect",
AESDISAB char(2) label="Persist or Signif Disability/Incapacity",
AESDTH char(2) label="Results in Death",
AESHOSP char(2) label="Requires or Prolongs Hospitalization",
AESLIFE char(2) label="Is Life Threatening",
AESOD char(2) label="Occurred with Overdose",
AESMIE char(2) label="Other Medically Important Serious Event",
AECONTRT char(2) label="Concomitant or Additional Trtmnt Given",
AETOXGR char(20) label="Standard Toxicity Grade",
AESTDTC char(64) label="Start Date/Time of Adverse Event",
AEENDTC char(64) label="End Date/Time of Adverse Event",
AESTDY numeric label="Study Day of Start of Adverse Event",
AEENDY numeric label="Study Day of End of Adverse Event",
AEDUR char(64) label="Duration of Adverse Event",
AEENRF char(20) label="End Relative to Reference Period",
AEENRTPT char(40) label="End Relative to Reference Time Point",
AEENTPT char(40) label="End Reference Time Point" )