/*------------------------------------------------------------*
* program:     cdisc108.sas                                     *
* Description: Case #108. TE End Element For TE domains, this identifies records that violate the condition*
*              [Rule for End of Element is not null or Planned Duration of Element is not null].*
* By:          Sy Truong, 10/14/2009                          *
*-------------------------------------------------------------*/
 
libname templib '../data';

*** Create some data to be selected ***;
data templib.te(label="Demographics");
attrib STUDYID   label="Study Identifier" length=$100;
attrib DOMAIN  	 label="Domain Abbreviation" length=$100;
attrib ETCD      label="Element Code" length=$100;
attrib ELEMENT   label="Description of Element" length=$100;
attrib TESTRL   label="Rule for Start of Element" length=$100;
attrib TEENRL   label="Rule for End of Element" length=$100;
attrib TEDUR  	 label="Study Site Identifier" length=$100;

STUDYID ='test'; 
DOMAIN='test';ETCD='test';  ELEMENT  ='test';TESTRL  ='test';TEENRL  ='test';TEDUR  ='';
;
output;
STUDYID ='test';
DOMAIN='test';ETCD='test';  ELEMENT  ='test';TESTRL  ='test';TEENRL  ='';TEDUR  ='test';
output;
STUDYID ='test';
DOMAIN='test';ETCD='test';  ELEMENT  ='test';TESTRL  ='test';TEENRL  ='';TEDUR  ='';
;
output;
STUDYID ='test';
DOMAIN='test';ETCD='test';  ELEMENT  ='test';TESTRL  ='test';TEENRL  ='test';TEDUR  ='test';
output;
STUDYID ='test';
DOMAIN='test';ETCD='test';  ELEMENT  ='test';TESTRL  ='test';TEENRL  ='test';TEDUR  ='';
;
output;
STUDYID ='test';
DOMAIN='test';ETCD='test';  ELEMENT  ='test';TESTRL  ='test';TEENRL  ='';TEDUR  ='';
output;
run;
%cdisc(datlib=templib,datname=te);
