/*------------------------------------------------------------*
* program:     cdisc23.sas                                    *
* Description: Case #23. MedDRA Term Mismatch For AE domains, this identifies records where*
*              the value for the Preferred Term could not be found in the MedDRA dictionary.*
* By:          Sy Truong, 10/14/2009                          *
*-------------------------------------------------------------*/
 
libname templib '../data';

*** Create some data to be selected ***;
data templib.ae(label="Adverse Events");
attrib STUDYID	label="Study Identifier" length=$100;
attrib DOMAIN	label="Domain Abbreviation" length=$100;
attrib USUBJID	label="Unique Subject Identifier" length=$100;
attrib AESEQ	label="Sequence Number" length=8;
attrib AEGRPID	label="Group ID" length=$100;
attrib AEREFID	label="Reference ID" length=$100;
attrib AESPID	label="Sponsor-Defined Identifier" length=$100;
attrib AETERM	label="Reported Term for the Adverse Event" length=$100;
attrib AEMODIFY	label="Modified Reported Term" length=$100;
attrib AEDECOD	label="Dictionary-Derived Term" length=$100;

STUDYID='test';DOMAIN='test';USUBJID='test';AESEQ=1;AEGRPID='test';AEREFID='test';AESPID='test';AETERM='term1';AEMODIFY='test';AEDECOD='decode1';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';AESEQ=1;AEGRPID='test';AEREFID='test';AESPID='test';AETERM='term2';AEMODIFY='test';AEDECOD='decode2';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';AESEQ=1;AEGRPID='test';AEREFID='test';AESPID='test';AETERM='term3';AEMODIFY='test';AEDECOD='decode3';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';AESEQ=1;AEGRPID='test';AEREFID='test';AESPID='test';AETERM='term4';AEMODIFY='test';AEDECOD='decode4';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';AESEQ=1;AEGRPID='test';AEREFID='test';AESPID='test';AETERM='term5';AEMODIFY='test';AEDECOD='decode5';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';AESEQ=1;AEGRPID='test';AEREFID='test';AESPID='test';AETERM='term6';AEMODIFY='test';AEDECOD='';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';AESEQ=1;AEGRPID='test';AEREFID='test';AESPID='test';AETERM='term7';AEMODIFY='test';AEDECOD='decode6';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';AESEQ=1;AEGRPID='test';AEREFID='test';AESPID='test';AETERM='term8';AEMODIFY='test';AEDECOD='decode7';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';AESEQ=1;AEGRPID='test';AEREFID='test';AESPID='test';AETERM='term9';AEMODIFY='test';AEDECOD='decode8';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';AESEQ=1;AEGRPID='test';AEREFID='test';AESPID='test';AETERM='term10';AEMODIFY='test';AEDECOD='';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';AESEQ=1;AEGRPID='test';AEREFID='test';AESPID='test';AETERM='term11';AEMODIFY='test';AEDECOD='';
output;
run;
%cdisc(datlib=templib,datname=ae);
