/*------------------------------------------------------------*
* program:     cdisc104.sas                                     *
* Description: Case #104. IE Results Codelist For IE domains, this identifies records that violate the condition *
*              [I/E Criterion Original Result = I/E Criterion Result in Std Format].*
* By:          Sy Truong, 10/14/2009                          *
*-------------------------------------------------------------*/
 
libname templib '../data';
options nofmterr;
*** Create some data to be selected ***;
data templib.IE(label="Inclusion/Exclusion Criteria Not Met");
attrib STUDYID	label="Study IdentifIEr" length=$100;
attrib DOMAIN	label="Domain Abbreviation" length=$100;
attrib USUBJID	label="Unique Subject IdentifIEr" length=$100;
attrib IESEQ	label="Sequence Number" length=8;
attrib IEGRPID	label="Group ID" length=$100;
attrib IESPID	label="Sponsor-Defined IdentifIEr" length=$100;
attrib IETESTCD	label="Question Short Name" length=$100;
attrib IETEST	label="Question Name" length=$100;
attrib IECAT	label="Category of Question" length=$100;
attrib IESCAT	label="Subcategory for Question" length=$100;
attrib IEORRES	label="I/E Criterion Original Result" length=$100;
attrib IESTRESC	label="I/E Criterion Result in Std Format" length=$100;
attrib VISITNUM	label="Visit Number" length=8;
attrib VISIT	label="Visit Name" length=$100;
attrib VISITDY	label="Planned Study Day of Visit" length=8;
attrib IEDTC	label="Date/Time of Finding" length=$100;
attrib IEDY		label="Study Day of Finding" length=8;

STUDYID = 'test';DOMAIN = 'test';USUBJID = '123';IESEQ = 1;IEGRPID = 'test';IESPID = 'test';IETESTCD = 'test';IETEST = 'test';IECAT = 'test';IESCAT = 'test';IEORRES = 'N';
IESTRESC = 'Y';
output;
STUDYID = 'test';DOMAIN = 'test';USUBJID = '123';IESEQ = 1;IEGRPID = 'test';IESPID = 'test';IETESTCD = 'test';IETEST = 'test';IECAT = 'test';IESCAT = 'test';IEORRES = 'NA';
IESTRESC = 'NA';
output;
STUDYID = 'test';DOMAIN = 'test';USUBJID = '456';IESEQ = 1;IEGRPID = 'test';IESPID = 'test';IETESTCD = 'test';IETEST = 'test';IECAT = 'test';IESCAT = 'test';IEORRES = 'N';
IESTRESC = 'Y';
output;
STUDYID = 'test';DOMAIN = 'test';USUBJID = '456';IESEQ = 1;IEGRPID = 'test';IESPID = 'test';IETESTCD = 'test';IETEST = 'test';IECAT = 'test';IESCAT = 'test';IEORRES = 'U';
IESTRESC = 'U';
output;
STUDYID = 'test';DOMAIN = 'test';USUBJID = '789';IESEQ = 1;IEGRPID = 'test';IESPID = 'test';IETESTCD = 'test';IETEST = 'test';IECAT = 'test';IESCAT = 'test';IEORRES = 'Y';
IESTRESC = 'Y';
output;
STUDYID = 'test';DOMAIN = 'test';USUBJID = '789';IESEQ = 1;IEGRPID = 'test';IESPID = 'test';IETESTCD = 'test';IETEST = 'test';IECAT = 'test';IESCAT = 'test';IEORRES = 'N';
IESTRESC = 'N';
output;
run;
%cdisc(datlib=templib,datname=IE);
