14.3.5.1
Shifts from Baseline to End of Treatment in Laboratory Values: Chemistry
Made 2026-10-17 from simulated data.
ONCO-EX
Table 14.3.5.1
Shifts from Baseline to End of Treatment in Laboratory Values: Chemistry
Safety Analysis Set
| Standard of Care (N=150) | Clinwrightinib 200 mg (N=150) | |||||
|---|---|---|---|---|---|---|
| Low | Normal | High | Low | Normal | High | |
| Parameter: Sodium (mmol/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 147 (98.0%) | 0 (0.0%) | 0 (0.0%) | 148 (98.7%) | 0 (0.0%) |
| Baseline High | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Parameter: Potassium (mmol/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 148 (98.7%) | 0 (0.0%) | 0 (0.0%) | 150 (100.0%) | 0 (0.0%) |
| Baseline High | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Parameter: Chloride (mmol/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 149 (99.3%) | 0 (0.0%) | 0 (0.0%) | 149 (99.3%) | 0 (0.0%) |
| Baseline High | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Parameter: Bilirubin (umol/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 147 (98.0%) | 0 (0.0%) | 0 (0.0%) | 145 (96.7%) | 1 (0.7%) |
| Baseline High | 0 (0.0%) | 1 (0.7%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 1 (0.7%) |
| Parameter: Alkaline Phosphatase (U/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 1 (0.7%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 140 (93.3%) | 2 (1.3%) | 0 (0.0%) | 141 (94.0%) | 2 (1.3%) |
| Baseline High | 0 (0.0%) | 6 (4.0%) | 1 (0.7%) | 0 (0.0%) | 4 (2.7%) | 0 (0.0%) |
| Parameter: Gamma Glutamyl Transferase (U/L) | ||||||
| Baseline Low | 2 (1.3%) | 2 (1.3%) | 0 (0.0%) | 3 (2.0%) | 3 (2.0%) | 0 (0.0%) |
| Baseline Normal | 5 (3.3%) | 126 (84.0%) | 6 (4.0%) | 6 (4.0%) | 125 (83.3%) | 3 (2.0%) |
| Baseline High | 0 (0.0%) | 5 (3.3%) | 1 (0.7%) | 0 (0.0%) | 5 (3.3%) | 4 (2.7%) |
| Parameter: Alanine Aminotransferase (U/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 148 (98.7%) | 0 (0.0%) | 0 (0.0%) | 147 (98.0%) | 1 (0.7%) |
| Baseline High | 0 (0.0%) | 1 (0.7%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Parameter: Aspartate Aminotransferase (U/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 149 (99.3%) | 0 (0.0%) | 0 (0.0%) | 146 (97.3%) | 1 (0.7%) |
| Baseline High | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 2 (1.3%) | 0 (0.0%) |
| Parameter: Creatinine (umol/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 149 (99.3%) | 0 (0.0%) | 0 (0.0%) | 149 (99.3%) | 0 (0.0%) |
| Baseline High | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Parameter: Urate (umol/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 149 (99.3%) | 0 (0.0%) | 0 (0.0%) | 149 (99.3%) | 0 (0.0%) |
| Baseline High | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Parameter: Phosphate (mmol/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 150 (100.0%) | 0 (0.0%) | 0 (0.0%) | 148 (98.7%) | 0 (0.0%) |
| Baseline High | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Parameter: Calcium (mmol/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 149 (99.3%) | 0 (0.0%) | 0 (0.0%) | 147 (98.0%) | 0 (0.0%) |
| Baseline High | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Parameter: Glucose (mmol/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 149 (99.3%) | 0 (0.0%) | 0 (0.0%) | 146 (97.3%) | 0 (0.0%) |
| Baseline High | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Parameter: Protein (g/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 148 (98.7%) | 0 (0.0%) | 0 (0.0%) | 150 (100.0%) | 0 (0.0%) |
| Baseline High | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Parameter: Albumin (g/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 149 (99.3%) | 0 (0.0%) | 0 (0.0%) | 149 (99.3%) | 0 (0.0%) |
| Baseline High | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Parameter: Cholesterol (mmol/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 149 (99.3%) | 0 (0.0%) | 0 (0.0%) | 149 (99.3%) | 0 (0.0%) |
| Baseline High | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Parameter: Creatine Kinase (U/L) | ||||||
| Baseline Low | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) |
| Baseline Normal | 0 (0.0%) | 145 (96.7%) | 3 (2.0%) | 0 (0.0%) | 145 (96.7%) | 2 (1.3%) |
| Baseline High | 0 (0.0%) | 1 (0.7%) | 0 (0.0%) | 0 (0.0%) | 2 (1.3%) | 1 (0.7%) |
Categories at End of Treatment (columns) by the baseline category (rows); percent of the subjects in each treatment group.
Source: ADLBC.
Program: t-14-3-5-1.sas
Program t-14-3-5-1.sas
Version 1, written from Clinwright's patterns, 2026-10-17, checks passed.
/*==== 00-header ====*/
/*----------------------------------------------------------------------------
Output : Table 14.3.5.1 / Shifts from Baseline to End of Treatment in Laboratory Values: Chemistry / Safety Analysis Set
Program : t-14-3-5-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 Low
col2 Normal
col3 High
col4 Low
col5 Normal
col6 High
and set the big N of the column headers:
&_bign1_3 Standard of Care|(N=xx)
&_bign4_6 Clinwrightinib 200 mg|(N=xx)
/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;
/* The shell's rows, in order, with each column's value pattern (_xx1-_xx6). */
data work._shell;
length _page 8 _pagelbl $200 _ord 8 _indent 8 _rowid $36 _kind $5 _var $32 rowlabel $200 _xx1 $40 _xx2 $40 _xx3 $40 _xx4 $40 _xx5 $40 _xx6 $40;
_page = 1; _pagelbl = '';
_ord=1; _indent=0; _rowid='8f1741df-48d6-4127-a8e5-b3faa5692159'; _kind='stat'; _var='BNRIND'; rowlabel='Baseline Low'; _xx1='xx (xx.x%)'; _xx2='xx (xx.x%)'; _xx3='xx (xx.x%)'; _xx4='xx (xx.x%)'; _xx5='xx (xx.x%)'; _xx6='xx (xx.x%)'; output;
_ord=2; _indent=0; _rowid='blank-2'; _kind='blank'; _var=''; rowlabel=''; _xx1=''; _xx2=''; _xx3=''; _xx4=''; _xx5=''; _xx6=''; output;
_ord=3; _indent=0; _rowid='b1f0a0ab-bb53-4f6d-ac4d-f7a687d4b900'; _kind='stat'; _var='BNRIND'; rowlabel='Baseline Normal'; _xx1='xx (xx.x%)'; _xx2='xx (xx.x%)'; _xx3='xx (xx.x%)'; _xx4='xx (xx.x%)'; _xx5='xx (xx.x%)'; _xx6='xx (xx.x%)'; output;
_ord=4; _indent=0; _rowid='blank-4'; _kind='blank'; _var=''; rowlabel=''; _xx1=''; _xx2=''; _xx3=''; _xx4=''; _xx5=''; _xx6=''; output;
_ord=5; _indent=0; _rowid='a84f8bf7-24be-4329-8b88-321956f5454e'; _kind='stat'; _var='BNRIND'; rowlabel='Baseline High'; _xx1='xx (xx.x%)'; _xx2='xx (xx.x%)'; _xx3='xx (xx.x%)'; _xx4='xx (xx.x%)'; _xx5='xx (xx.x%)'; _xx6='xx (xx.x%)'; output;
run;
/*==== 10-data ====*/
/* Made from the output's analysis: the records of ADLBC with AVISIT = 'End of Treatment' of the subjects of ADSL with SAFFL = 'Y', by TRT01A. */
/* The population's subjects, in each column they count in. */
data work._popc;
set adam.adsl(where=(saffl = 'Y'));
if trt01a in ('Standard of Care') then do; _col = 1; output; end;
if trt01a in ('Standard of Care') then do; _col = 2; output; end;
if trt01a in ('Standard of Care') then do; _col = 3; output; end;
if trt01a in ('Clinwrightinib 200 mg') then do; _col = 4; output; end;
if trt01a in ('Clinwrightinib 200 mg') then do; _col = 5; output; end;
if trt01a in ('Clinwrightinib 200 mg') then do; _col = 6; output; end;
keep usubjid _col;
run;
data work._pop1; set adam.adsl(where=(saffl = 'Y')); keep usubjid trt01a; run;
proc sort data=work._pop1; by usubjid; run;
/* The records of ADLBC with AVISIT = 'End of Treatment', of the population's subjects, in each column. */
proc sort data=adam.adlbc(keep=usubjid saffl avisit param paramn anrind bnrind where=(AVISIT = 'End of Treatment')) out=work._rec; by usubjid; run;
data work._an;
merge work._rec(in=_r) work._pop1(in=_p);
by usubjid;
if _r and _p;
if trt01a in ('Standard of Care') and anrind = 'L' then do; _col = 1; output; end;
if trt01a in ('Standard of Care') and anrind = 'N' then do; _col = 2; output; end;
if trt01a in ('Standard of Care') and anrind = 'H' then do; _col = 3; output; end;
if trt01a in ('Clinwrightinib 200 mg') and anrind = 'L' then do; _col = 4; output; end;
if trt01a in ('Clinwrightinib 200 mg') and anrind = 'N' then do; _col = 5; output; end;
if trt01a in ('Clinwrightinib 200 mg') and anrind = 'H' then do; _col = 6; output; end;
run;
data work._cols; do _col = 1 to 6; output; end; run;
%ls_bign(data=work._popc, trt=_col, values=1|2|3|4|5|6|1 2 3|4 5 6, names=_lsn1 _lsn2 _lsn3 _lsn4 _lsn5 _lsn6 _bign1_3 _bign4_6);
/* Subjects and records per column. */
proc sort data=work._an(keep=usubjid _col) out=work._u; by _col usubjid; run;
data work._c;
set work._u;
by _col usubjid;
retain _n _e;
if first._col then do; _n = 0; _e = 0; end;
_e = _e + 1;
if first.usubjid then _n = _n + 1;
if last._col then output;
keep _col _n _e;
run;
proc transpose data=work._c out=work._tn(drop=_name_) prefix=_n; id _col; var _n; run;
proc transpose data=work._c out=work._te(drop=_name_) prefix=_e; id _col; var _e; run;
data work._z; _z = 1; run;
data work._g1;
merge work._z work._tn work._te;
array _nn{6} _n1-_n6;
array _ee{6} _e1-_e6;
do _i = 1 to 6; _nn{_i} = sum(_nn{_i}, 0); _ee{_i} = sum(_ee{_i}, 0); end;
_tot = sum(of _n1-_n6);
drop _i _z;
run;
/* Per value of param: subjects and records per column. */
proc sort data=work._an(keep=usubjid _col param paramn where=(not missing(param))) out=work._u; by param _col usubjid; run;
data work._c;
set work._u;
by param _col usubjid;
retain _n _e;
if first._col then do; _n = 0; _e = 0; end;
_e = _e + 1;
if first.usubjid then _n = _n + 1;
if last._col then output;
keep param paramn _col _n _e;
run;
proc transpose data=work._c out=work._tn(drop=_name_) prefix=_n; by param paramn; id _col; var _n; run;
proc transpose data=work._c out=work._te(drop=_name_) prefix=_e; by param paramn; id _col; var _e; run;
data work._g0;
merge work._tn work._te; by param paramn;
array _nn{6} _n1-_n6;
array _ee{6} _e1-_e6;
do _i = 1 to 6; _nn{_i} = sum(_nn{_i}, 0); _ee{_i} = sum(_ee{_i}, 0); end;
_tot = sum(of _n1-_n6);
drop _i;
run;
proc sort data=work._g0; by paramn param; run;
data work._g0;
set work._g0;
_o1 = _n_;
run;
/* Baseline Low: npct of BNRIND = L. */
data work._f; set work._g0; do _col = 1 to 6; output; end; run;
proc sort data=work._f; by param _col; run;
proc sort data=work._an(keep=usubjid param _col bnrind where=(bnrind = 'L')) out=work._v; by param _col usubjid; run;
data work._v;
set work._v;
by param _col usubjid;
retain _vn _ve;
if first._col then do; _vn = 0; _ve = 0; end;
_ve = _ve + 1;
if first.usubjid then _vn = _vn + 1;
if last._col then output;
keep param _col _vn _ve;
run;
proc sort data=work._an(keep=usubjid param _col bnrind where=(not missing(bnrind))) out=work._d; by param _col usubjid; run;
data work._d;
set work._d;
by param _col usubjid;
retain _dn _de;
if first._col then do; _dn = 0; _de = 0; end;
_de = _de + 1;
if first.usubjid then _dn = _dn + 1;
if last._col then output;
keep param _col _dn _de;
run;
data work._k1;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._v work._d;
by param _col;
if _in;
array _nn{6} _n1-_n6;
array _ee{6} _e1-_e6;
_rowid = '8f1741df-48d6-4127-a8e5-b3faa5692159';
_page = _o1;
_pagelbl = 'Parameter: ' || strip(param);
_k0 = 1;
_label = '';
_v = strip(ifc(missing(sum(_vn, 0)), '-', %ls_num(sum(_vn, 0), 0))) || ' (' || strip(ifc(missing(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .)), '-', %ls_num(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .), 1))) || '%)';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
/* . */
data work._f; set work._g0; do _col = 1 to 6; output; end; run;
proc sort data=work._f; by param _col; run;
data work._k2;
length _rowid $36 _label _pagelbl $200 _v $200;
set work._f;
array _nn{6} _n1-_n6;
array _ee{6} _e1-_e6;
_rowid = 'blank-2';
_page = _o1;
_pagelbl = 'Parameter: ' || strip(param);
_k0 = 2;
_label = '';
_v = '';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
/* Baseline Normal: npct of BNRIND = N. */
data work._f; set work._g0; do _col = 1 to 6; output; end; run;
proc sort data=work._f; by param _col; run;
proc sort data=work._an(keep=usubjid param _col bnrind where=(bnrind = 'N')) out=work._v; by param _col usubjid; run;
data work._v;
set work._v;
by param _col usubjid;
retain _vn _ve;
if first._col then do; _vn = 0; _ve = 0; end;
_ve = _ve + 1;
if first.usubjid then _vn = _vn + 1;
if last._col then output;
keep param _col _vn _ve;
run;
proc sort data=work._an(keep=usubjid param _col bnrind where=(not missing(bnrind))) out=work._d; by param _col usubjid; run;
data work._d;
set work._d;
by param _col usubjid;
retain _dn _de;
if first._col then do; _dn = 0; _de = 0; end;
_de = _de + 1;
if first.usubjid then _dn = _dn + 1;
if last._col then output;
keep param _col _dn _de;
run;
data work._k3;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._v work._d;
by param _col;
if _in;
array _nn{6} _n1-_n6;
array _ee{6} _e1-_e6;
_rowid = 'b1f0a0ab-bb53-4f6d-ac4d-f7a687d4b900';
_page = _o1;
_pagelbl = 'Parameter: ' || strip(param);
_k0 = 3;
_label = '';
_v = strip(ifc(missing(sum(_vn, 0)), '-', %ls_num(sum(_vn, 0), 0))) || ' (' || strip(ifc(missing(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .)), '-', %ls_num(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .), 1))) || '%)';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
/* . */
data work._f; set work._g0; do _col = 1 to 6; output; end; run;
proc sort data=work._f; by param _col; run;
data work._k4;
length _rowid $36 _label _pagelbl $200 _v $200;
set work._f;
array _nn{6} _n1-_n6;
array _ee{6} _e1-_e6;
_rowid = 'blank-4';
_page = _o1;
_pagelbl = 'Parameter: ' || strip(param);
_k0 = 4;
_label = '';
_v = '';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
/* Baseline High: npct of BNRIND = H. */
data work._f; set work._g0; do _col = 1 to 6; output; end; run;
proc sort data=work._f; by param _col; run;
proc sort data=work._an(keep=usubjid param _col bnrind where=(bnrind = 'H')) out=work._v; by param _col usubjid; run;
data work._v;
set work._v;
by param _col usubjid;
retain _vn _ve;
if first._col then do; _vn = 0; _ve = 0; end;
_ve = _ve + 1;
if first.usubjid then _vn = _vn + 1;
if last._col then output;
keep param _col _vn _ve;
run;
proc sort data=work._an(keep=usubjid param _col bnrind where=(not missing(bnrind))) out=work._d; by param _col usubjid; run;
data work._d;
set work._d;
by param _col usubjid;
retain _dn _de;
if first._col then do; _dn = 0; _de = 0; end;
_de = _de + 1;
if first.usubjid then _dn = _dn + 1;
if last._col then output;
keep param _col _dn _de;
run;
data work._k5;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._v work._d;
by param _col;
if _in;
array _nn{6} _n1-_n6;
array _ee{6} _e1-_e6;
_rowid = 'a84f8bf7-24be-4329-8b88-321956f5454e';
_page = _o1;
_pagelbl = 'Parameter: ' || strip(param);
_k0 = 5;
_label = '';
_v = strip(ifc(missing(sum(_vn, 0)), '-', %ls_num(sum(_vn, 0), 0))) || ' (' || strip(ifc(missing(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .)), '-', %ls_num(ifn(input(symget(cats('_lsn', _col)), 8.) > 0, 100 * sum(_vn, 0) / max(input(symget(cats('_lsn', _col)), 8.), 1), .), 1))) || '%)';
keep _rowid _label _page _pagelbl _k0 _col _v;
run;
data work._cells; set work._k1 work._k2 work._k3 work._k4 work._k5; run;
proc sort data=work._cells; by _page _pagelbl _k0 _rowid _label _col; run;
proc transpose data=work._cells out=work._wide(drop=_name_) prefix=col;
by _page _pagelbl _k0 _rowid _label;
id _col;
var _v;
run;
proc sort data=work._wide; by _rowid; run;
proc sort data=work._shell(drop=_page _pagelbl) out=work._rows; by _rowid; run;
data work._inst;
merge work._wide(in=_w) work._rows(in=_s);
by _rowid;
if _w and _s;
if _label ne '' then rowlabel = _label;
run;
data work._fixed;
set work._shell;
if _rowid not in ('8f1741df-48d6-4127-a8e5-b3faa5692159' 'blank-2' 'b1f0a0ab-bb53-4f6d-ac4d-f7a687d4b900' 'blank-4' 'a84f8bf7-24be-4329-8b88-321956f5454e');
_k0 = _ord;
run;
data work.final;
length col1 col2 col3 col4 col5 col6 $200 _pagelbl $200;
set work._inst work._fixed;
run;
proc sort data=work.final; by _page _k0; run;
data work.final;
set work.final;
_ord = _n_;
keep _page _pagelbl _ord _indent _rowid _kind rowlabel col1 col2 col3 col4 col5 col6;
run;
/*==== 90-report ====*/
/* 90-report: from the shell; the titles, columns, headers and footnotes are not changed here. */
%ls_need(_bign1_3 _bign4_6);
%ls_final_check(columns=_page _pagelbl _ord _indent _rowid _kind rowlabel col1 col2 col3 col4 col5 col6);
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/t-14-3-5-1.rtf" style=journal;
title1 j=l "ONCO-EX" j=r "Page ~{thispage} of ~{lastpage}";
title2 j=c "Table 14.3.5.1";
title3 j=c "Shifts from Baseline to End of Treatment in Laboratory Values: Chemistry";
title4 j=c "Safety Analysis Set";
footnote1 j=l "Categories at End of Treatment (columns) by the baseline category (rows); percent of the subjects in each treatment group.";
footnote2 j=l "Source: ADLBC.";
footnote3 j=l "Program: t-14-3-5-1.sas";
%macro _ls_report;
proc report data=work._report nowd split='|' missing style(report)={width=100%};
column _page _pagelbl _ord _indent _kind rowlabel ("Standard of Care|(N=&_bign1_3.)" col1 col2 col3) ("Clinwrightinib 200 mg|(N=&_bign4_6.)" col4 col5 col6);
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 "" style(column)={cellwidth=40% asis=on} style(header)={just=l};
define col1 / display "Low" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col2 / display "Normal" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col3 / display "High" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col4 / display "Low" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col5 / display "Normal" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col6 / display "High" 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;