14.3.2.1
Listing of Adverse Events Leading to Death
Made 2026-10-17 from simulated data.
ONCO-EX
Listing 14.3.2.1
Listing of Adverse Events Leading to Death
Safety Analysis Set
| Subject | Treatment | System organ class | Preferred term | Start date | End date | Severity | Relationship | Action taken | Outcome |
|---|---|---|---|---|---|---|---|---|---|
| ONCO-EX-704028 | Standard of Care | INFECTIONS AND INFESTATIONS | PNEUMONIA | 16FEB2024 | 29FEB2024 | SEVERE | POSSIBLY RELATED | DRUG WITHDRAWN | FATAL |
| ONCO-EX-708015 | Clinwrightinib 200 mg | INFECTIONS AND INFESTATIONS | PNEUMONIA | 26NOV2022 | 25DEC2022 | SEVERE | POSSIBLY RELATED | DRUG WITHDRAWN | FATAL |
| ONCO-EX-710038 | Clinwrightinib 200 mg | GASTROINTESTINAL DISORDERS | GASTROINTESTINAL HAEMORRHAGE | 28MAY2023 | 31MAY2023 | SEVERE | RELATED | DRUG WITHDRAWN | FATAL |
Source: ADAE.
Program: l-14-3-2-1.sas
Program l-14-3-2-1.sas
Version 1, written from Clinwright's patterns, 2026-10-17, checks passed.
/*==== 00-header ====*/
/*----------------------------------------------------------------------------
Output : Listing 14.3.2.1 / Listing of Adverse Events Leading to Death / Safety Analysis Set
Program : l-14-3-2-1.sas Reporting effort : CSR
ADaM : /work/adam (ADSL, ADLBC, ADLBH, ADVS, ADAE, ADEG, ADCM, ADMH, ADEX, ADRS, ADTR, ADTTE)
The header and the report step follow from the shell. The sections between
them make WORK.FINAL, one record per row of the table, in order:
_page the page (1 unless the output is paged); _pagelbl its heading or empty
_ord the row's order; _indent the label's indentation (0 = flush left)
_rowid the uuid of the shell row it shows (WORK._SHELL); one shell row may
have several (a category per value); a blank row's is blank-<n>
_kind label | stat | blank
rowlabel the row's label, as text
col1 Treatment (TRTA)
col2 System organ class (AEBODSYS)
col3 Preferred term (AEDECOD)
col4 Start date (ASTDT)
col5 End date (AENDT)
col6 Severity (AESEV)
col7 Relationship (AEREL)
col8 Action taken (AEACN)
col9 Outcome (AEOUT)
/work/_lib/clinwright.sas has %ls_bign, %ls_count, %ls_stats, %ls_npct, %ls_num.
----------------------------------------------------------------------------*/
libname adam "/work/adam" access=readonly;
%include "/work/_lib/clinwright.sas";
%ls_setup;
/*==== 10-data ====*/
/* Made from the output's analysis: the records of ADAE with AESDTH = 'Y' of the subjects of ADSL with SAFFL = 'Y', by USUBJID, ASTDT. */
data work._pop1; set adam.adsl(where=(saffl = 'Y')); keep usubjid; run;
proc sort data=work._pop1; by usubjid; run;
proc sort data=adam.adae(keep=usubjid trta saffl astdt aendt aedecod aebodsys aesev aesdth aerel aeacn aeout where=(AESDTH = 'Y')) out=work._rec; by usubjid; run;
data work._an; merge work._rec(in=_r) work._pop1(in=_p); by usubjid; if _r and _p; run;
proc sort data=work._an; by usubjid astdt; run;
data work.final;
length _pagelbl $200 _rowid $36 _kind $5 rowlabel col1 col2 col3 col4 col5 col6 col7 col8 col9 $200;
set work._an;
_page = 1; _pagelbl = ''; _indent = 0; _rowid = ''; _kind = 'stat';
rowlabel = strip(vvalue(usubjid));
col1 = strip(vvalue(trta));
col2 = strip(vvalue(aebodsys));
col3 = strip(vvalue(aedecod));
col4 = strip(vvalue(astdt));
col5 = strip(vvalue(aendt));
col6 = strip(vvalue(aesev));
col7 = strip(vvalue(aerel));
col8 = strip(vvalue(aeacn));
col9 = strip(vvalue(aeout));
_ord = _n_;
keep _page _pagelbl _ord _indent _rowid _kind rowlabel col1 col2 col3 col4 col5 col6 col7 col8 col9;
run;
data work.final;
if _nobs = 0 then do;
_page = 1; _pagelbl = ''; _indent = 0; _rowid = ''; _kind = 'stat'; _ord = 1; rowlabel = 'No records to report.'; output;
end;
set work.final nobs=_nobs;
output;
run;
/*==== 90-report ====*/
/* 90-report: from the shell; the titles, columns, headers and footnotes are not changed here. */
%ls_final_check(columns=_page _pagelbl _ord _indent _rowid _kind rowlabel col1 col2 col3 col4 col5 col6 col7 col8 col9);
proc sort data=work.final out=work._report; by _page _ord; run;
data work._report;
set work._report;
/* Two spaces per step of indentation: the label column keeps leading spaces (asis=on). */
if _indent > 0 then rowlabel = repeat(' ', 2 * _indent - 1) || rowlabel;
run;
%let _lspaged = 0;
proc sql noprint; select count(*) into :_lspaged trimmed from work._report where _pagelbl ne ''; quit;
options orientation=landscape;
ods listing close;
ods rtf file="/work/out/l-14-3-2-1.rtf" style=journal;
title1 j=l "ONCO-EX" j=r "Page ~{thispage} of ~{lastpage}";
title2 j=c "Listing 14.3.2.1";
title3 j=c "Listing of Adverse Events Leading to Death";
title4 j=c "Safety Analysis Set";
footnote1 j=l "Source: ADAE.";
footnote2 j=l "Program: l-14-3-2-1.sas";
%macro _ls_report;
proc report data=work._report nowd split='|' missing style(report)={width=100%};
column _page _pagelbl _ord _indent _kind rowlabel col1 col2 col3 col4 col5 col6 col7 col8 col9;
define _page / order order=internal noprint;
define _pagelbl / order noprint;
define _ord / order order=internal noprint;
define _indent / display noprint;
define _kind / display noprint;
define rowlabel / display "Subject" style(column)={cellwidth=10% asis=on} style(header)={just=l};
define col1 / display "Treatment" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col2 / display "System organ class" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col3 / display "Preferred term" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col4 / display "Start date" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col5 / display "End date" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col6 / display "Severity" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col7 / display "Relationship" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col8 / display "Action taken" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col9 / display "Outcome" style(column)={cellwidth=10% just=c} style(header)={just=c};
%if &_lspaged > 0 %then %do;
compute before _pagelbl / style={just=l};
line _pagelbl $200.;
endcomp;
%end;
break after _page / page;
run;
%mend _ls_report;
%_ls_report;
ods rtf close;
ods listing;
%ls_final_export;