/*------------------------------------------------------------*
* program:     cdisc76.sas                                    *
* Description: Case #76. IE Short Name For IE domains, this identifies records where *
*              the value for Inclusion/Exclusion Criterion Short Name is not found in the TI domain.*
* By:          Sy Truong, 10/14/2009                          *
*-------------------------------------------------------------*/
 
libname templib '../data';

*** 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 IESPID	label="Sponsor-Defined Identifier" length=$100;
attrib IETESTCD	label="Inclusion/Exclusion Criterion Short Name" length=$100;
attrib IETEST	label="Inclusion/Exclusion Criterion" length=$100;
attrib IECAT	label="Inclusion/Exclusion Category" length=$100;
attrib IESCAT	label="Inclusion/Exclusion Subcategory" 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 Collection" length=$100;
attrib IEDY	label="Study Day of Collection" length=8;
STUDYID='test';
DOMAIN='test';
USUBJID='test';
IESEQ=1;IESPID='test';IETESTCD='EXCL17';IETEST='test';IECAT='test';IESCAT='test';IEORRES='test';IESTRESC='test';VISITNUM=1;VISIT='test';VISITDY=123;IEDTC='test';IEDY=1;output;
IESEQ=1;IESPID='test';IETESTCD='EXCL17';IETEST='test';IECAT='test';IESCAT='test';IEORRES='test';IESTRESC='test';VISITNUM=1;VISIT='test';VISITDY=123;IEDTC='test';IEDY=1;output;
IESEQ=1;IESPID='test';IETESTCD='INCL03';IETEST='test';IECAT='test';IESCAT='test';IEORRES='test';IESTRESC='test';VISITNUM=1;VISIT='test';VISITDY=123;IEDTC='test';IEDY=1;output;
IESEQ=1;IESPID='test';IETESTCD='EXCL17';IETEST='test';IECAT='test';IESCAT='test';IEORRES='test';IESTRESC='test';VISITNUM=1;VISIT='test';VISITDY=123;IEDTC='test';IEDY=1;output;
IESEQ=1;IESPID='test';IETESTCD='INCL03';IETEST='test';IECAT='test';IESCAT='test';IEORRES='test';IESTRESC='test';VISITNUM=1;VISIT='test';VISITDY=123;IEDTC='test';IEDY=1;output;
IESEQ=1;IESPID='test';IETESTCD='EXCL17';IETEST='test';IECAT='test';IESCAT='test';IEORRES='test';IESTRESC='test';VISITNUM=1;VISIT='test';VISITDY=123;IEDTC='test';IEDY=1;output;
run;

data templib.ti(label="Trial Inclusion/Exclusion Criteria");
attrib STUDYID	label="Study Identifier" length=$100;
attrib DOMAIN	label="Domain Abbreviation" length=$100;
attrib IETESTCD	label="Incl/Excl Criterion Short Name" length=$100;
attrib IETEST	label="Inclusion/Exclusion Criterion" length=$100;
attrib IECAT	label="Inclusion/Exclusion Category" length=$100;
attrib IESCAT	label="Inclusion/Exclusion Subcategory" length=$100;
attrib TIRL	label="Inclusion/Exclusion Criterion Rule" length=$100;
attrib TIVERS	label="Protocol Criteria Versions" length=$100;
STUDYID='test';
DOMAIN='test';IETESTCD='EXCL17';IETEST='test';IECAT='test';IESCAT='test';TIRL='test';TIVERS='test';
output;

run;

%cdisc(datlib=templib,datname=ie);
