/*------------------------------------------------------------*
* program:     cdisc103.sas                                     *
* Description: Case #103. Study Format Codelist For IE domains, this identifies records where value*
*              for [I/E Criterion Result in Std Format] is not found in Codelist [YESNO], *
*              limited to records where [I/E Criterion Result in Std Format is not null].*
* By:          Sy Truong, 10/14/2009                          *
*-------------------------------------------------------------*/
 
libname templib '../data';
option 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" format=$YN. 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';
IESTRESC = '';
output;
STUDYID = 'test';DOMAIN = 'test';USUBJID = '123';IESEQ = 1;IEGRPID = 'test';IESPID = 'test';IETESTCD = 'test';IETEST = 'test';IECAT = 'test';IESCAT = 'test';
IESTRESC = 'Y';
output;
STUDYID = 'test';DOMAIN = 'test';USUBJID = '456';IESEQ = 1;IEGRPID = 'test';IESPID = 'test';IETESTCD = 'test';IETEST = 'test';IECAT = 'test';IESCAT = 'test';
IESTRESC = 'TEST';
output;
STUDYID = 'test';DOMAIN = 'test';USUBJID = '456';IESEQ = 1;IEGRPID = 'test';IESPID = 'test';IETESTCD = 'test';IETEST = 'test';IECAT = 'test';IESCAT = 'test';
IESTRESC = 'U';
output;
STUDYID = 'test';DOMAIN = 'test';USUBJID = '789';IESEQ = 1;IEGRPID = 'test';IESPID = 'test';IETESTCD = 'test';IETEST = 'test';IECAT = 'test';IESCAT = 'test';
IESTRESC = 'N';
output;
STUDYID = 'test';DOMAIN = 'test';USUBJID = '789';IESEQ = 1;IEGRPID = 'test';IESPID = 'test';IETESTCD = 'test';IETEST = 'test';IECAT = 'test';IESCAT = 'test';
IESTRESC = 'NA';
output;
run;
%cdisc(datlib=templib,datname=IE);
