ADTTE
AE Time To 1st Derm. Event Analysis
BASIC DATA STRUCTURE · one record per subject per parameter · keys USUBJID, PARAMCD
Variables
| Variable | Label | Type | Length | Derivation |
|---|---|---|---|---|
STUDYID | Study Identifier | text | Predecessor ADSL.STUDYID | |
SITEID | Study Site Identifier | text | Predecessor ADSL.SITEID | |
USUBJID | Unique Subject Identifier | text | Predecessor ADSL.USUBJID | |
AGE | Age | integer | 8 | Predecessor ADSL.AGE |
AGEGR1 | Pooled Age Group 1 | text | Predecessor ADSL.AGEGR1 | |
AGEGR1N | Pooled Age Group 1 (N) | integer | 8 | Predecessor ADSL.AGEGR1N |
RACE | Race | text | Predecessor ADSL.RACE | |
RACEN | Race (N) | integer | 8 | Predecessor ADSL.RACEN |
SEX | Sex | text | Predecessor ADSL.SEX | |
TRTSDT | Date of First Exposure to Treatment | integer | 8 | Predecessor ADSL.TRTSDT |
TRTEDT | Date of Last Exposure to Treatment | integer | 8 | Predecessor ADSL.TRTEDT |
TRTDUR | Duration of treatment (days) | integer | 8 | Predecessor ADSL.TRTDURD |
TRTP | Planned Treatment | text | Predecessor ADSL.TRT01P | |
TRTA | Actual Treatment | text | Predecessor ADSL.TRT01A | |
TRTAN | Actual Treatment (N) | integer | 8 | Predecessor ADSL.TRT01AN |
PARAM | Parameter | text | Assigned Sponsor | |
PARAMCD | Parameter Code | text | Assigned Sponsor | |
AVAL | Analysis Value | integer | 8 | |
STARTDT | Time to Event Origin Date for Subject | integer | 8 | Predecessor ADTTE.STARTDT |
ADT | Analysis Date | integer | 8 | if ADAE.ASTDT is not missing and occurred after TRTSDT then ADAE.ASTDT else convert ADSL.RFENDTC to a SAS numeric date |
CNSR | Censor | integer | 8 | if ADAE.TRTEMFL ="Y" then CNSR=0, else CNSR=1 |
EVNTDESC | Event or Censoring Description | text | if ADTTE.CNSR = 0 then "Dematologic Event Occured", else if ADTTE.CNSR =1 then "Study Completion Date" | |
SRCDOM | Source Domain | text | The Source domain referred to in order to populate ADT (either ADAE or ADSL) | |
SRCVAR | Source Variable | text | The Source variable referred to in order to populate ADT (either ASTDT or RFENDT) | |
SRCSEQ | Source Sequence Number | integer | 8 | The value of ADAE.AESEQ if SRCDOM=ADAE, otherwise null. |
SAFFL | Safety Population Flag | text | Predecessor ADSL.SAFFL |
Program adtte.sas
Version 1, written from Clinwright's patterns, 2026-10-17, checks passed.
/*==== 00-header ====*/
/*----------------------------------------------------------------------------
Data set : ADTTE (AE Time To 1st Derm. Event Analysis)
Reporting effort : CSR
ADaM : ADAE, ADSL
The header and the finalize step follow from the specification.
----------------------------------------------------------------------------*/
libname sdtm "/work/sdtm" access=readonly;
libname adam "/work/adam";
options validvarname=upcase nofmterr msglevel=i;
/*==== 10-inputs ====*/
/* The subjects of ADSL, with ADSL's variables. */
data work._ds;
set adam.adsl;
trtdur = trtdurd;
trtp = trt01p;
trta = trt01a;
trtan = trt01an;
run;
/* STARTDT (a copy of ADTTE.STARTDT): merge it on. */
/*==== 25-derived-parameters ====*/
/* AVAL[TTDE] (Time to Derm. Event or End of Study): ADT-STARTDT+1 -- to write. */
/*==== 30-timing ====*/
/* ADT: ADSL.RFENDTC as a SAS date. */
data work._ds;
set work._ds;
length _dtc $10;
_dtc = rfendtc; /* (its first 10 characters: SUBSTR would complain of a shorter variable) */
if length(_dtc) = 10 then adt = input(_dtc, ?? yymmdd10.);
format adt date9.;
drop _dtc;
run;
/*==== 70-other ====*/
/* Time to event TTDE: the first ADAE record where TRTEMFL ="Y" on or after TRTSDT is the event (CNSR = 0); */
/* a subject without one is censored (CNSR = 1) at RFENDT. AVAL: days from TRTSDT, +1. */
proc sort data=adam.adae(where=((TRTEMFL ="Y") and not missing(astdt))) out=work._tte(keep=usubjid astdt aeseq);
by usubjid astdt aeseq;
run;
data work._tte;
merge work._tte(in=_e) work._ds(keep=usubjid trtsdt);
by usubjid;
if _e and astdt >= trtsdt > .;
run;
data work._tte(keep=usubjid _evdt _evseq);
set work._tte;
by usubjid;
if first.usubjid;
_evdt = astdt;
_evseq = aeseq;
run;
data work._ds;
merge work._ds(in=_in) work._tte(in=_ev);
by usubjid;
if _in;
length paramcd $8 param evntdesc srcdom srcvar $200;
paramcd = "TTDE";
param = 'Time to First Dermatologic Event';
startdt = trtsdt;
if _ev then do;
adt = _evdt; cnsr = 0; evntdesc = 'Dematologic Event Occured'; srcdom = "ADAE"; srcvar = "ASTDT";
srcseq = _evseq;
end;
else do;
adt = rfendt; cnsr = 1; evntdesc = 'Study Completion Date'; srcdom = "ADSL"; srcvar = "RFENDT"; call missing(srcseq);
end;
if nmiss(adt, startdt) = 0 then aval = adt - startdt + 1;
format adt startdt date9.;
drop _evdt _evseq;
run;
/*==== 89-final ====*/
/* The data set as derived; the finalize step keeps the specification's variables. */
data work._final;
set work._ds;
run;
/*==== 90-finalize ====*/
/* 90-finalize: from the specification; the variables, their order and attributes are not changed here. */
/* The text variables the specification gives no length: as long as their longest value (at least 1). */
%let _len1 = 1; %let _len2 = 1; %let _len3 = 1; %let _len4 = 1; %let _len5 = 1; %let _len6 = 1; %let _len7 = 1; %let _len8 = 1; %let _len9 = 1; %let _len10 = 1; %let _len11 = 1; %let _len12 = 1; %let _len13 = 1; %let _len14 = 1;
data _null_;
length _ren _asg _siz $32767;
_dsid = open('work._final');
if varnum(_dsid, 'STUDYID') > 0 then do; _ren = catx(' ', _ren, 'STUDYID=_rz1'); _asg = catx(' ', _asg, 'STUDYID = _rz1;');
_siz = catx(' ', _siz, '_len1 = max(_len1, lengthn(STUDYID));'); end;
if varnum(_dsid, 'SITEID') > 0 then do; _ren = catx(' ', _ren, 'SITEID=_rz2'); _asg = catx(' ', _asg, 'SITEID = _rz2;');
_siz = catx(' ', _siz, '_len2 = max(_len2, lengthn(SITEID));'); end;
if varnum(_dsid, 'USUBJID') > 0 then do; _ren = catx(' ', _ren, 'USUBJID=_rz3'); _asg = catx(' ', _asg, 'USUBJID = _rz3;');
_siz = catx(' ', _siz, '_len3 = max(_len3, lengthn(USUBJID));'); end;
if varnum(_dsid, 'AGEGR1') > 0 then do; _ren = catx(' ', _ren, 'AGEGR1=_rz4'); _asg = catx(' ', _asg, 'AGEGR1 = _rz4;');
_siz = catx(' ', _siz, '_len4 = max(_len4, lengthn(AGEGR1));'); end;
if varnum(_dsid, 'RACE') > 0 then do; _ren = catx(' ', _ren, 'RACE=_rz5'); _asg = catx(' ', _asg, 'RACE = _rz5;');
_siz = catx(' ', _siz, '_len5 = max(_len5, lengthn(RACE));'); end;
if varnum(_dsid, 'SEX') > 0 then do; _ren = catx(' ', _ren, 'SEX=_rz6'); _asg = catx(' ', _asg, 'SEX = _rz6;');
_siz = catx(' ', _siz, '_len6 = max(_len6, lengthn(SEX));'); end;
if varnum(_dsid, 'TRTP') > 0 then do; _ren = catx(' ', _ren, 'TRTP=_rz7'); _asg = catx(' ', _asg, 'TRTP = _rz7;');
_siz = catx(' ', _siz, '_len7 = max(_len7, lengthn(TRTP));'); end;
if varnum(_dsid, 'TRTA') > 0 then do; _ren = catx(' ', _ren, 'TRTA=_rz8'); _asg = catx(' ', _asg, 'TRTA = _rz8;');
_siz = catx(' ', _siz, '_len8 = max(_len8, lengthn(TRTA));'); end;
if varnum(_dsid, 'PARAM') > 0 then do; _ren = catx(' ', _ren, 'PARAM=_rz9'); _asg = catx(' ', _asg, 'PARAM = _rz9;');
_siz = catx(' ', _siz, '_len9 = max(_len9, lengthn(PARAM));'); end;
if varnum(_dsid, 'PARAMCD') > 0 then do; _ren = catx(' ', _ren, 'PARAMCD=_rz10'); _asg = catx(' ', _asg, 'PARAMCD = _rz10;');
_siz = catx(' ', _siz, '_len10 = max(_len10, lengthn(PARAMCD));'); end;
if varnum(_dsid, 'EVNTDESC') > 0 then do; _ren = catx(' ', _ren, 'EVNTDESC=_rz11'); _asg = catx(' ', _asg, 'EVNTDESC = _rz11;');
_siz = catx(' ', _siz, '_len11 = max(_len11, lengthn(EVNTDESC));'); end;
if varnum(_dsid, 'SRCDOM') > 0 then do; _ren = catx(' ', _ren, 'SRCDOM=_rz12'); _asg = catx(' ', _asg, 'SRCDOM = _rz12;');
_siz = catx(' ', _siz, '_len12 = max(_len12, lengthn(SRCDOM));'); end;
if varnum(_dsid, 'SRCVAR') > 0 then do; _ren = catx(' ', _ren, 'SRCVAR=_rz13'); _asg = catx(' ', _asg, 'SRCVAR = _rz13;');
_siz = catx(' ', _siz, '_len13 = max(_len13, lengthn(SRCVAR));'); end;
if varnum(_dsid, 'SAFFL') > 0 then do; _ren = catx(' ', _ren, 'SAFFL=_rz14'); _asg = catx(' ', _asg, 'SAFFL = _rz14;');
_siz = catx(' ', _siz, '_len14 = max(_len14, lengthn(SAFFL));'); end;
_rc = close(_dsid);
if _ren ne '' then _ren = cats('(rename=(', _ren, '))');
call symputx('_ren', _ren);
call symputx('_asg', _asg);
call symputx('_siz', _siz);
run;
data _null_;
set work._final end=_end;
retain _len1 1 _len2 1 _len3 1 _len4 1 _len5 1 _len6 1 _len7 1 _len8 1 _len9 1 _len10 1 _len11 1 _len12 1 _len13 1 _len14 1;
&_siz
if _end then do;
call symputx('_len1', _len1);
call symputx('_len2', _len2);
call symputx('_len3', _len3);
call symputx('_len4', _len4);
call symputx('_len5', _len5);
call symputx('_len6', _len6);
call symputx('_len7', _len7);
call symputx('_len8', _len8);
call symputx('_len9', _len9);
call symputx('_len10', _len10);
call symputx('_len11', _len11);
call symputx('_len12', _len12);
call symputx('_len13', _len13);
call symputx('_len14', _len14);
end;
run;
data adam.adtte(label="AE Time To 1st Derm. Event Analysis");
attrib
STUDYID length=$&_len1 label="Study Identifier"
SITEID length=$&_len2 label="Study Site Identifier"
USUBJID length=$&_len3 label="Unique Subject Identifier"
AGE length=8 label="Age"
AGEGR1 length=$&_len4 label="Pooled Age Group 1"
AGEGR1N length=8 label="Pooled Age Group 1 (N)"
RACE length=$&_len5 label="Race"
RACEN length=8 label="Race (N)"
SEX length=$&_len6 label="Sex"
TRTSDT length=8 label="Date of First Exposure to Treatment" format=DATE9.
TRTEDT length=8 label="Date of Last Exposure to Treatment" format=DATE9.
TRTDUR length=8 label="Duration of treatment (days)"
TRTP length=$&_len7 label="Planned Treatment"
TRTA length=$&_len8 label="Actual Treatment"
TRTAN length=8 label="Actual Treatment (N)"
PARAM length=$&_len9 label="Parameter"
PARAMCD length=$&_len10 label="Parameter Code"
AVAL length=8 label="Analysis Value"
STARTDT length=8 label="Time to Event Origin Date for Subject" format=DATE9.
ADT length=8 label="Analysis Date" format=DATE9.
CNSR length=8 label="Censor"
EVNTDESC length=$&_len11 label="Event or Censoring Description"
SRCDOM length=$&_len12 label="Source Domain"
SRCVAR length=$&_len13 label="Source Variable"
SRCSEQ length=8 label="Source Sequence Number"
SAFFL length=$&_len14 label="Safety Population Flag"
;
set work._final&_ren;
&_asg
keep STUDYID SITEID USUBJID AGE AGEGR1 AGEGR1N RACE RACEN SEX TRTSDT TRTEDT TRTDUR TRTP TRTA TRTAN PARAM PARAMCD AVAL STARTDT ADT CNSR EVNTDESC SRCDOM SRCVAR SRCSEQ SAFFL;
run;
proc sort data=adam.adtte; by USUBJID PARAMCD; run;
Data (first 20 of 254 records, uploaded)
| STUDYID | SITEID | USUBJID | AGE | AGEGR1 | AGEGR1N | RACE | RACEN | SEX | TRTSDT | TRTEDT | TRTDUR | TRTP | TRTA | TRTAN | PARAM | PARAMCD | AVAL | STARTDT | ADT | CNSR | EVNTDESC | SRCDOM | SRCVAR | SRCSEQ | SAFFL |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CDISCPILOT01 | 701 | 01-701-1015 | 63 | <65 | 1 | WHITE | 1 | F | 2014-01-02 | 2014-07-02 | 182 | Placebo | Placebo | 0 | Time to First Dermatologic Event | TTDE | 2 | 2014-01-02 | 2014-01-03 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1023 | 64 | <65 | 1 | WHITE | 1 | M | 2012-08-05 | 2012-09-01 | 28 | Placebo | Placebo | 0 | Time to First Dermatologic Event | TTDE | 3 | 2012-08-05 | 2012-08-07 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1028 | 71 | 65-80 | 2 | WHITE | 1 | M | 2013-07-19 | 2014-01-14 | 180 | Xanomeline High Dose | Xanomeline High Dose | 81 | Time to First Dermatologic Event | TTDE | 3 | 2013-07-19 | 2013-07-21 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1033 | 74 | 65-80 | 2 | WHITE | 1 | M | 2014-03-18 | 2014-03-31 | 14 | Xanomeline Low Dose | Xanomeline Low Dose | 54 | Time to First Dermatologic Event | TTDE | 28 | 2014-03-18 | 2014-04-14 | 1 | Study Completion Date | ADSL | RFENDT | Y | |
| CDISCPILOT01 | 701 | 01-701-1034 | 77 | 65-80 | 2 | WHITE | 1 | F | 2014-07-01 | 2014-12-30 | 183 | Xanomeline High Dose | Xanomeline High Dose | 81 | Time to First Dermatologic Event | TTDE | 58 | 2014-07-01 | 2014-08-27 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1047 | 85 | >80 | 3 | WHITE | 1 | F | 2013-02-12 | 2013-03-09 | 26 | Placebo | Placebo | 0 | Time to First Dermatologic Event | TTDE | 1 | 2013-02-12 | 2013-02-12 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1097 | 68 | 65-80 | 2 | WHITE | 1 | M | 2014-01-01 | 2014-07-09 | 190 | Xanomeline Low Dose | Xanomeline Low Dose | 54 | Time to First Dermatologic Event | TTDE | 3 | 2014-01-01 | 2014-01-03 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1111 | 81 | >80 | 3 | WHITE | 1 | F | 2012-09-07 | 2012-09-16 | 10 | Xanomeline Low Dose | Xanomeline Low Dose | 54 | Time to First Dermatologic Event | TTDE | 1 | 2012-09-07 | 2012-09-07 | 0 | Dematologic Event Occured | ADAE | ASTDT | 6 | Y |
| CDISCPILOT01 | 701 | 01-701-1115 | 84 | >80 | 3 | WHITE | 1 | M | 2012-11-30 | 2013-01-23 | 55 | Xanomeline Low Dose | Xanomeline Low Dose | 54 | Time to First Dermatologic Event | TTDE | 3 | 2012-11-30 | 2012-12-02 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1118 | 52 | <65 | 1 | WHITE | 1 | M | 2014-03-12 | 2014-09-09 | 182 | Placebo | Placebo | 0 | Time to First Dermatologic Event | TTDE | 182 | 2014-03-12 | 2014-09-09 | 1 | Study Completion Date | ADSL | RFENDT | Y | |
| CDISCPILOT01 | 701 | 01-701-1130 | 84 | >80 | 3 | WHITE | 1 | M | 2014-02-15 | 2014-08-16 | 183 | Placebo | Placebo | 0 | Time to First Dermatologic Event | TTDE | 23 | 2014-02-15 | 2014-03-09 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1133 | 81 | >80 | 3 | WHITE | 1 | F | 2012-10-28 | 2013-04-28 | 183 | Xanomeline High Dose | Xanomeline High Dose | 81 | Time to First Dermatologic Event | TTDE | 61 | 2012-10-28 | 2012-12-27 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1146 | 75 | 65-80 | 2 | WHITE | 1 | F | 2013-05-20 | 2013-06-26 | 38 | Xanomeline High Dose | Xanomeline High Dose | 81 | Time to First Dermatologic Event | TTDE | 13 | 2013-05-20 | 2013-06-01 | 0 | Dematologic Event Occured | ADAE | ASTDT | 3 | Y |
| CDISCPILOT01 | 701 | 01-701-1148 | 57 | <65 | 1 | WHITE | 1 | M | 2013-08-23 | 2014-02-20 | 182 | Xanomeline High Dose | Xanomeline High Dose | 81 | Time to First Dermatologic Event | TTDE | 3 | 2013-08-23 | 2013-08-25 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1153 | 79 | 65-80 | 2 | WHITE | 1 | F | 2013-09-23 | 2014-03-16 | 175 | Placebo | Placebo | 0 | Time to First Dermatologic Event | TTDE | 21 | 2013-09-23 | 2013-10-13 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1180 | 56 | <65 | 1 | WHITE | 1 | M | 2013-02-12 | 2013-03-18 | 35 | Xanomeline High Dose | Xanomeline High Dose | 81 | Time to First Dermatologic Event | TTDE | 1 | 2013-02-12 | 2013-02-12 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1181 | 79 | 65-80 | 2 | WHITE | 1 | F | 2013-12-05 | 2013-12-09 | 5 | Xanomeline High Dose | Xanomeline High Dose | 81 | Time to First Dermatologic Event | TTDE | 5 | 2013-12-05 | 2013-12-09 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1188 | 71 | 65-80 | 2 | WHITE | 1 | M | 2013-02-15 | 2013-03-24 | 38 | Xanomeline Low Dose | Xanomeline Low Dose | 54 | Time to First Dermatologic Event | TTDE | 2 | 2013-02-15 | 2013-02-16 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1192 | 80 | 65-80 | 2 | WHITE | 1 | F | 2012-07-22 | 2013-01-20 | 183 | Xanomeline Low Dose | Xanomeline Low Dose | 54 | Time to First Dermatologic Event | TTDE | 13 | 2012-07-22 | 2012-08-03 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |
| CDISCPILOT01 | 701 | 01-701-1203 | 81 | >80 | 3 | BLACK OR AFRICAN AMERICAN | 2 | F | 2013-02-02 | 2013-08-03 | 183 | Placebo | Placebo | 0 | Time to First Dermatologic Event | TTDE | 48 | 2013-02-02 | 2013-03-21 | 0 | Dematologic Event Occured | ADAE | ASTDT | 1 | Y |