/*------------------------------------------------------------* 
* program:     cdisc66.sas                                    * 
* Description: Case #66. Study Day Zero For All domains, this identifies records that*
*              violate the condition [Study Day of Visit/Collection/Exam doesn't equal 0].* 
* By:          Sy Truong, 10/14/2009                          *
*-------------------------------------------------------------*/
libname templib '../data';
data templib.da(label="Drug Accountability");
attrib STUDYID length=$7 label="Study Identifier";
attrib DOMAIN length=$2 label="Domain Abbreviation";
attrib USUBJID length=$14 label="Unique Subject Identifier";
/*
attrib DASEQ length=8 label="Sequence Number";
attrib DATESTCD length=$7 label="Short Name of Accountability Assessment";
attrib DATEST length=$25 label="Name of Accountability Assessment";
attrib DACAT length=$16 label="Category of Assessment";
attrib DAORRES length=$2 label="Assessment Result in Original Units";
attrib DAORRESU length=$7 label="Original Units";
attrib DASTRESC length=$2 label="Assessment Result in Std Format";
attrib DASTRESN length=8 label="Numeric Result/Finding in Standard Units";
attrib DASTRESU length=$7 label="Standard Units";
attrib VISITNUM length=8 label="Visit Number";
attrib VISIT length=$8 label="Visit Name";
*/
attrib VISITDY length=8 label="Planned Study Day of Visit";
attrib DADTC length=$10 label="Date/Time of Accountability Assessment";
attrib DADY length=8 label="Study Day of Accountability Assessment";
STUDYID="CDISC01";
DOMAIN="DA";
USUBJID="CDISC01.100014";
/*
DASEQ=1;
DATESTCD="DISPAMT";
DATEST="Dispensed Amount";
DACAT="Study Medication";
DAORRES="80";
DAORRESU="TABLET";
DASTRESC="80";
DASTRESN=80;
DASTRESU="TABLET";
VISITNUM=3;
VISIT="WEEK 2";
*/
VISITDY=0;
DADTC="2003-10-31";
DADY=17;
output;
STUDYID="CDISC01";
DOMAIN="DA";
USUBJID="CDISC01.100014";
/*
DASEQ=2;
DATESTCD="RETAMT";
DATEST="Returned Amount";
DACAT="Study Medication";
DAORRES="44";
DAORRESU="TABLET";
DASTRESC="44";
DASTRESN=44;
DASTRESU="TABLET";
VISITNUM=3;
VISIT="WEEK 2";
*/
VISITDY=15;
DADTC="2003-10-31";
DADY=0;
output;
STUDYID="CDISC01";
DOMAIN="DA";
USUBJID="CDISC01.200001";
/*
DASEQ=1;
DATESTCD="DISPAMT";
DATEST="Dispensed Amount";
DACAT="Study Medication";
DAORRES="40";
DAORRESU="TABLET";
DASTRESC="40";
DASTRESN=40;
DASTRESU="TABLET";
VISITNUM=2;
VISIT="BASELINE";
*/
VISITDY=0;
DADTC="2003-09-30";
DADY=0;
output;
STUDYID="CDISC01";
DOMAIN="DA";
USUBJID="CDISC01.200001";
/*
DASEQ=2;
DATESTCD="RETAMT";
DATEST="Returned Amount";
DACAT="Study Medication";
DAORRES="19";
DAORRESU="TABLET";
DASTRESC="19";
DASTRESN=19;
DASTRESU="TABLET";
VISITNUM=2;
VISIT="BASELINE";
*/
VISITDY=1;
DADTC="2003-09-30";
DADY=1;
output;
run;
%cdisc(datlib=templib,datname=da);
