/*------------------------------------------------------------*
* program:     cdisc48.sas                                    *
* Description: Case #48. Elapse Time Zero For EX domains, this identifies records that violate the condition*
*              [Planned Elapsed Time from Reference Pt greater than or equal to 0], *
*              limited to records where [Planned Elapsed Time from Reference Pt is not null].*
* By:          Sy Truong, 10/14/2009                          *
*-------------------------------------------------------------*/
 
libname templib '../data';

*** Create some data to be selected ***;
data templib.ex(label="Exposure");
attrib STUDYID	label="Study Identifier" length=$100;
attrib DOMAIN	label="Domain Abbreviation" length=$100;
attrib USUBJID	label="Unique Subject Identifier" length=$100;
attrib EXSEQ	label="Sequence Number" length=8;
attrib EXGRPID	label="Group ID" length=$100;
attrib EXSPID	label="Sponsor-Defined Identifier" length=$100;
attrib EXTRT	label="Name of Actual Treatment" length=$100;
attrib EXCAT	label="Category for Treatment" length=$100;
attrib EXSCAT	label="Subcategory for Treatment" length=$100;
attrib EXDOSE	label="Dose per Administration" length=8;
attrib EXELTM	label="Planned Elapsed Time from Time Point Ref" length=$50;
STUDYID='test';DOMAIN='test';USUBJID='test';EXSEQ=1;EXGRPID='test';EXSPID='test';EXTRT='test';EXCAT='test';EXSCAT='test';EXDOSE=0;EXELTM='PT1H30M';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';EXSEQ=1;EXGRPID='test';EXSPID='test';EXTRT='test';EXCAT='test';EXSCAT='test';EXDOSE=1;EXELTM='PT1H30M';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';EXSEQ=1;EXGRPID='test';EXSPID='test';EXTRT='test';EXCAT='test';EXSCAT='test';EXDOSE=2;EXELTM='-PT15M';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';EXSEQ=1;EXGRPID='test';EXSPID='test';EXTRT='test';EXCAT='test';EXSCAT='test';EXDOSE=0;EXELTM='';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';EXSEQ=1;EXGRPID='test';EXSPID='test';EXTRT='test';EXCAT='test';EXSCAT='test';EXDOSE=4;EXELTM='PT1H30M';
output;
STUDYID='test';DOMAIN='test';USUBJID='test';EXSEQ=1;EXGRPID='test';EXSPID='test';EXTRT='test';EXCAT='test';EXSCAT='test';EXDOSE=.;EXELTM='PT1H30M';
output;
run;
%cdisc(datlib=templib,datname=ex);
