/*------------------------------------------------------------*
* program:     cdisc28.sas                                     *
* Description: Case #28. TA Arm Code For TA domain, this identifies records that violate the condition*
*              [If Arm Code='SCRNFAIL' then Description of Arm must equal 'Screen Failure', and vice versa].*
* By:          Sy Truong, 10/14/2009                          *
*-------------------------------------------------------------*/
 
libname templib '../data';

*** Create some data to be selected ***;
data templib.ta(label="Trial Arms");
attrib STUDYID	label="Study Identifier" length=$100;
attrib DOMAIN	label="Domain Abbreviation" length=$100;
attrib ARMCD	label="Planned Arm Code" length=$100;
attrib ARM	label="Description of Planned Arm" length=$100;
attrib TAETORD	label="Order of Element within Arm" length=8;
attrib ETCD	label="Element Code" length=$100;
attrib ELEMENT	label="Description of Element" length=$100;
attrib TABRANCH	label="Branch" length=$100;
attrib TATRANS	label="Transition Rule" length=$100;
attrib EPOCH	label="Epoch" length=$100;
STUDYID='test';DOMAIN='test';ARMCD='SCRNFAIL';ARM='Screen Failure';TAETORD=1;ETCD='test';ELEMENT='test';TABRANCH='test';TATRANS='test';EPOCH='test';
output;
STUDYID='test';DOMAIN='test';ARMCD='test';ARM='test';TAETORD=1;ETCD='test';ELEMENT='test';TABRANCH='test';TATRANS='test';EPOCH='test';
output;
STUDYID='test';DOMAIN='test';ARMCD='test';ARM='Screen Failure';TAETORD=1;ETCD='test';ELEMENT='test';TABRANCH='test';TATRANS='test';EPOCH='test';
output;
STUDYID='test';DOMAIN='test';ARMCD='test';ARM='test';TAETORD=1;ETCD='test';ELEMENT='test';TABRANCH='test';TATRANS='test';EPOCH='test';
output;
STUDYID='test';DOMAIN='test';ARMCD='SCRNFAIL';ARM='Screen Failure';TAETORD=1;ETCD='test';ELEMENT='test';TABRANCH='test';TATRANS='test';EPOCH='test';
output;
STUDYID='test';DOMAIN='test';ARMCD='test';ARM='test';TAETORD=1;ETCD='test';ELEMENT='test';TABRANCH='test';TATRANS='test';EPOCH='test';
output;
STUDYID='test';DOMAIN='test';ARMCD='SCRNFAIL';ARM='Screen Failure';TAETORD=1;ETCD='test';ELEMENT='test';TABRANCH='test';TATRANS='test';EPOCH='test';
output;
STUDYID='test';DOMAIN='test';ARMCD='SCRNFAIL';ARM='test';TAETORD=1;ETCD='test';ELEMENT='test';TABRANCH='test';TATRANS='test';EPOCH='test';
output;
run;
%cdisc(datlib=templib,datname=ta);
