/*------------------------------------------------------------*
* program:     cdisc35.sas                                     *
* Description: Case #35. Occurrence Null For Events and Interventions domains, *
*              this identifies records that violate the condition [Occurrence in ('Y','N')], *
*              limited to records where [Occurrence is not null].*
* By:          Sy Truong, 10/14/2009                          *
*-------------------------------------------------------------*/
 
libname templib '../data';

*** Create some data to be selected ***;
data templib.ce(label="Clinical Events");
attrib STUDYID	label="Study Identifier" length=$100;
attrib DOMAIN	label="Domain Abbreviation" length=$100;
attrib USUBJID	label="Unique Subject Identifier" length=$100;
attrib CESEQ	label="Sequence Number" length=8;
attrib CEGRPID	label="Group ID" length=$100;
attrib CEREFID	label="Reference ID" length=$100;
attrib CESPID	label="Sponsor-Defined Identifier" length=$100;
attrib CETERM	label="Reported Term for the Clinical Event" length=$100;
attrib CEDECOD	label="Dictionary-Derived Term" length=$100;
attrib CECAT	label="Category for Clinical Event" length=$100;
attrib CESCAT	label="Subcategory for Clinical Event" length=$100;
attrib CEPRESP	label="Clinical Event Pre-Specified" length=$100;
attrib CEOCCUR	label="Clinical Event Occurrence" length=$100;
STUDYID='test';DOMAIN='test';USUBJID='test';CESEQ=1;CEGRPID='test';CEREFID='test';CESPID='test';CETERM='test';CEDECOD='test';CECAT='test';CESCAT='test';CEPRESP='test';CEOCCUR='Y';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';CESEQ=1;CEGRPID='test';CEREFID='test';CESPID='test';CETERM='test';CEDECOD='test';CECAT='test';CESCAT='test';CEPRESP='test';CEOCCUR='N';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';CESEQ=1;CEGRPID='test';CEREFID='test';CESPID='test';CETERM='test';CEDECOD='test';CECAT='test';CESCAT='test';CEPRESP='test';CEOCCUR='N';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';CESEQ=1;CEGRPID='test';CEREFID='test';CESPID='test';CETERM='test';CEDECOD='test';CECAT='test';CESCAT='test';CEPRESP='test';CEOCCUR='Y';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';CESEQ=1;CEGRPID='test';CEREFID='test';CESPID='test';CETERM='test';CEDECOD='test';CECAT='test';CESCAT='test';CEPRESP='test';CEOCCUR='I';
output;
run;
%cdisc(datlib=templib,datname=ce);
