Clinwright Public work of Helper Software LLC · free Start free

14.3.4.3

Summary of Vital Signs by Visit

Made 2026-10-17 from simulated data.

ONCO-EX

Table 14.3.4.3

Summary of Vital Signs by Visit

Safety Analysis Set

Standard of Care (N=150)Clinwrightinib 200 mg (N=150)
nMean (SD)Change Mean (SD)nMean (SD)Change Mean (SD)
Parameter: Systolic Blood Pressure (mmHg)
Baseline150138.1 (17.59)- (-)150138.7 (17.28)- (-)
Week 3147138.6 (17.60)0.3 (20.27)145139.5 (17.36)1.2 (20.01)
Week 6143134.6 (18.18)-3.5 (21.39)145139.8 (16.30)1.1 (17.78)
Week 981137.2 (17.73)-0.3 (21.54)115137.9 (17.76)-2.1 (21.29)
Week 1281136.1 (17.80)-1.2 (24.32)114136.9 (17.50)-3.1 (20.51)
Week 1580135.5 (15.45)-2.0 (20.96)114136.0 (15.08)-4.0 (20.24)
Week 1880134.9 (17.87)-2.3 (20.04)111135.3 (14.10)-3.9 (18.27)
Week 2179135.4 (15.76)-1.8 (20.34)105136.9 (12.94)-2.5 (18.00)
Week 2479138.9 (18.11)1.6 (21.47)105134.2 (14.99)-5.9 (18.23)
Week 2760136.3 (15.43)0.8 (19.19)96134.0 (14.15)-6.4 (18.93)
Week 3061133.9 (15.59)-1.0 (22.42)98136.2 (15.51)-3.9 (19.27)
Week 3343133.7 (15.48)-3.5 (19.90)81133.2 (16.76)-7.1 (19.96)
Week 3647135.2 (16.49)-1.5 (19.10)81134.2 (15.52)-6.6 (18.18)
Week 3935135.6 (15.94)-3.6 (22.33)69131.5 (15.15)-10.2 (15.97)
Week 4235136.4 (17.43)-3.9 (17.75)70131.1 (15.82)-9.1 (18.36)
Week 4528136.8 (18.09)-0.8 (23.09)62131.0 (18.30)-10.7 (17.11)
Week 4827132.7 (16.40)-5.2 (18.84)62127.6 (16.55)-14.7 (19.18)
End of Treatment226136.9 (16.53)-0.7 (20.52)202131.9 (17.61)-6.4 (21.00)
Parameter: Diastolic Blood Pressure (mmHg)
Baseline15074.7 (9.71)- (-)15075.3 (10.38)- (-)
Week 314975.5 (10.11)0.8 (12.56)14675.5 (10.47)0.0 (12.02)
Week 614576.2 (10.68)1.6 (11.39)14476.0 (10.57)0.8 (11.34)
Week 98075.5 (9.43)0.8 (11.52)11476.7 (9.57)1.8 (10.51)
Week 128174.7 (9.66)0.0 (12.29)11474.8 (10.68)-0.1 (11.64)
Week 158074.4 (10.76)0.0 (11.67)11273.5 (10.30)-1.0 (11.30)
Week 187775.3 (10.62)0.3 (11.60)10873.0 (9.27)-1.4 (10.23)
Week 217876.1 (10.28)1.5 (11.40)10575.9 (10.38)1.0 (11.54)
Week 247874.8 (10.48)0.0 (12.11)10772.8 (11.25)-1.9 (11.13)
Week 276076.2 (8.69)1.1 (10.32)9675.5 (11.35)0.9 (12.13)
Week 306175.2 (11.39)-0.3 (12.86)9773.2 (8.50)-1.1 (10.74)
Week 334373.1 (10.59)-3.3 (12.42)7973.6 (8.98)-0.5 (11.11)
Week 364572.0 (10.81)-5.0 (11.80)8174.0 (10.12)-0.5 (10.76)
Week 393574.6 (9.83)-3.5 (12.07)7075.4 (11.63)1.1 (12.95)
Week 423776.8 (9.82)-1.4 (11.68)7174.3 (8.47)0.0 (10.91)
Week 452775.1 (11.04)-4.8 (14.01)6171.5 (11.17)-3.1 (10.91)
Week 482776.4 (9.19)-3.2 (14.10)6172.9 (9.85)-1.8 (12.37)
End of Treatment22375.5 (10.55)0.8 (12.84)20573.9 (10.22)-1.9 (10.95)
Parameter: Pulse Rate (beats/min)
Baseline15069.2 (9.83)- (-)15071.0 (10.20)- (-)
Week 314767.8 (9.89)-1.3 (11.88)14770.5 (9.98)-0.6 (12.00)
Week 614267.4 (9.66)-1.9 (11.02)14372.2 (9.78)1.1 (12.12)
Week 98170.0 (9.87)-0.8 (11.28)11568.8 (9.33)-1.8 (11.68)
Week 128071.0 (10.23)0.5 (14.33)11070.5 (9.47)-0.3 (11.04)
Week 157970.5 (8.16)-0.3 (12.41)11370.0 (10.00)-0.8 (11.54)
Week 188071.4 (9.49)0.6 (11.27)11069.1 (10.26)-0.9 (12.93)
Week 217871.4 (9.01)0.9 (11.64)10769.2 (10.52)-1.0 (12.53)
Week 247970.3 (9.94)-0.6 (12.53)10768.4 (9.89)-1.8 (12.79)
Week 276070.7 (9.36)0.4 (12.66)9569.4 (9.09)-1.5 (11.70)
Week 306369.7 (11.27)-0.8 (11.57)9869.0 (10.64)-1.7 (11.61)
Week 334469.8 (8.90)-0.1 (11.63)7970.5 (10.66)0.1 (13.89)
Week 364772.7 (10.46)2.9 (13.01)8169.8 (10.63)-0.8 (11.54)
Week 393570.7 (8.65)0.8 (11.34)6969.2 (9.34)-0.4 (11.29)
Week 423770.4 (8.52)0.7 (10.99)7168.9 (10.65)-1.2 (11.92)
Week 452868.2 (9.21)-1.6 (11.48)6267.8 (9.05)-2.0 (12.03)
Week 482672.7 (9.45)2.5 (10.33)6170.2 (10.08)-0.4 (12.02)
End of Treatment22369.5 (9.90)-0.1 (11.27)20369.5 (9.51)-1.7 (11.85)
Parameter: Weight (kg)
Baseline15068.4 (12.48)- (-)15066.6 (13.23)- (-)
Week 314867.9 (12.54)-0.5 (6.52)14666.8 (13.92)0.1 (6.97)
Week 614668.2 (12.97)-0.4 (6.79)14266.4 (14.09)-0.1 (6.14)
Week 97967.1 (12.11)0.4 (6.86)11467.1 (12.83)-0.1 (6.15)
Week 127966.9 (11.98)-0.2 (6.53)11366.8 (13.66)-0.3 (6.24)
Week 157766.9 (11.98)0.2 (5.96)11367.1 (13.31)0.7 (6.24)
Week 188066.4 (11.65)-0.8 (6.53)11166.8 (13.09)0.1 (7.12)
Week 217966.1 (11.90)-1.1 (6.61)10766.7 (14.05)0.4 (7.02)
Week 247967.1 (11.79)-0.3 (6.48)10866.3 (13.19)0.1 (6.66)
Week 275866.7 (12.05)0.0 (5.49)9667.1 (14.35)1.1 (7.30)
Week 306267.5 (13.19)0.5 (7.23)9667.1 (13.46)1.2 (6.06)
Week 334467.8 (10.99)-0.8 (6.17)8066.7 (13.54)-0.1 (6.61)
Week 364568.3 (12.73)0.1 (6.47)8166.5 (14.52)-0.1 (6.99)
Week 393567.7 (12.25)-0.4 (5.69)6966.8 (13.75)0.7 (6.83)
Week 423768.0 (11.18)0.0 (5.42)7067.7 (13.55)1.4 (6.38)
Week 452868.5 (12.01)-1.2 (5.60)6166.9 (13.44)1.1 (6.20)
Week 482669.0 (13.31)-1.4 (5.65)6267.5 (13.20)1.2 (5.98)
End of Treatment22768.1 (13.35)0.1 (6.58)20267.4 (13.26)0.8 (5.95)
Parameter: Height (cm)
Baseline150163.2 (10.16)- (-)150163.4 (10.44)- (-)
Week 3145163.3 (10.11)0.1 (2.32)147163.2 (10.16)0.0 (2.15)
Week 6144162.7 (10.25)-0.3 (2.17)144163.4 (10.42)0.0 (2.27)
Week 980162.0 (10.15)0.2 (2.18)113165.0 (10.21)0.4 (2.15)
Week 1280162.2 (10.36)0.0 (2.09)114164.9 (9.82)0.6 (2.38)
Week 1580162.3 (10.10)0.0 (1.91)113164.6 (10.25)0.3 (2.12)
Week 1880161.7 (10.36)-0.1 (2.06)111164.5 (10.20)0.1 (2.24)
Week 2179161.9 (9.79)-0.1 (2.19)104164.5 (10.01)0.4 (2.29)
Week 2479162.3 (10.00)0.3 (2.08)107164.5 (10.13)0.3 (2.08)
Week 2761162.5 (10.76)0.0 (2.31)97165.2 (10.32)0.6 (2.07)
Week 3061162.4 (10.67)-0.1 (2.09)98165.3 (10.30)0.6 (2.24)
Week 3343162.0 (11.47)0.3 (2.19)78165.1 (10.06)0.3 (2.22)
Week 3647161.9 (11.75)0.1 (2.42)81165.7 (9.83)0.4 (2.10)
Week 3935163.4 (9.97)0.4 (2.10)68165.2 (10.08)0.1 (2.16)
Week 4237163.7 (10.47)0.9 (2.53)71165.0 (10.28)0.2 (1.91)
Week 4528162.9 (11.00)0.7 (2.08)61165.9 (10.76)0.6 (2.15)
Week 4825162.9 (11.70)0.3 (2.29)62166.0 (10.16)0.6 (2.51)
End of Treatment224163.4 (10.01)-0.1 (2.35)205163.6 (10.11)0.0 (2.13)
Parameter: Temperature (C)
Baseline15036.6 (0.37)- (-)15036.6 (0.42)- (-)
Week 314936.6 (0.38)0.0 (0.55)14536.6 (0.41)0.0 (0.53)
Week 614136.6 (0.40)0.0 (0.55)14436.6 (0.42)0.1 (0.57)
Week 97936.6 (0.43)0.0 (0.60)11536.6 (0.40)0.0 (0.55)
Week 127836.6 (0.37)0.0 (0.46)11236.6 (0.40)0.0 (0.53)
Week 158036.6 (0.42)0.0 (0.61)11336.6 (0.42)0.0 (0.49)
Week 188036.6 (0.35)0.0 (0.53)11036.6 (0.41)0.0 (0.58)
Week 217936.6 (0.36)0.0 (0.52)10736.5 (0.45)-0.1 (0.57)
Week 247936.6 (0.42)0.0 (0.54)10636.5 (0.34)0.0 (0.46)
Week 276136.6 (0.45)0.1 (0.58)9636.6 (0.42)0.0 (0.50)
Week 306336.6 (0.38)0.0 (0.53)9836.6 (0.41)0.1 (0.53)
Week 334336.6 (0.39)0.1 (0.64)7936.6 (0.38)0.0 (0.55)
Week 364636.7 (0.42)0.1 (0.57)8136.6 (0.43)0.0 (0.51)
Week 393536.6 (0.44)0.1 (0.62)6936.6 (0.38)0.0 (0.55)
Week 423736.7 (0.37)0.1 (0.60)6936.6 (0.38)0.1 (0.55)
Week 452836.5 (0.40)-0.1 (0.61)6136.6 (0.39)0.0 (0.52)
Week 482736.6 (0.46)0.0 (0.68)6236.5 (0.44)0.0 (0.63)
End of Treatment22436.7 (0.46)0.1 (0.57)20636.6 (0.45)0.0 (0.58)

Change: from baseline.

Source: ADVS.

Program: t-14-3-4-3.sas

Program t-14-3-4-3.sas

Version 1, written from Clinwright's patterns, 2026-10-17, checks passed.

/*==== 00-header ====*/
/*----------------------------------------------------------------------------
  Output  : Table 14.3.4.3 / Summary of Vital Signs by Visit / Safety Analysis Set
  Program : t-14-3-4-3.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      n
    col2      Mean (SD)
    col3      Change|Mean (SD)
    col4      n
    col5      Mean (SD)
    col6      Change|Mean (SD)
  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='5772a1b5-5293-437a-8de7-fe7835f0e5b1'; _kind='stat'; _var='AVISIT'; rowlabel='[Visit]'; _xx1='xx'; _xx2='xx.x (xx.xx)'; _xx3='xx.x (xx.xx)'; _xx4='xx'; _xx5='xx.x (xx.xx)'; _xx6='xx.x (xx.xx)'; output;
run;

/*==== 10-data ====*/
/* Made from the output's analysis: the records of ADVS 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 ADVS, of the population's subjects, in each column. */
proc sort data=adam.advs(keep=usubjid saffl param paramn avisit avisitn aval chg visit) 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') 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;
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._g2;
  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._g1;
  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._g1; by paramn param; run;
data work._g1;
  set work._g1;
  _o1 = _n_;
run;
/* Per value of param and avisit: subjects and records per column. */
proc sort data=work._an(keep=usubjid _col param avisit avisitn where=(not missing(param) and not missing(avisit))) out=work._u; by param avisit _col usubjid; run;
data work._c;
  set work._u;
  by param avisit _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 avisit avisitn _col _n _e;
run;
proc transpose data=work._c out=work._tn(drop=_name_) prefix=_n; by param avisit avisitn; id _col; var _n; run;
proc transpose data=work._c out=work._te(drop=_name_) prefix=_e; by param avisit avisitn; id _col; var _e; run;
data work._g0;
  merge work._tn work._te; by param avisit avisitn;
  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 param avisitn avisit; run;
data work._g0;
  set work._g0;
  by param;
  retain _r;
  if first.param then _r = 0;
  _r = _r + 1;
  _o2 = _r;
  drop _r;
run;
proc sort data=work._g0; by param; run;
proc sort data=work._g1(keep=param _o1) out=work._gp; by param; run;
data work._g0; merge work._g0(in=_in) work._gp; by param; if _in; run;
/* [Visit] of AVISIT. */
data work._f; set work._g0; do _col = 1 to 6; output; end; run;
proc sort data=work._f; by param avisit _col; run;
%ls_stats(data=work._an, out=work._cs0, var=aval, trt=_col, by=param avisit, keepraw=Y);
data work._cs0;
  set work._cs0(rename=(_vn=_c0n _vmean=_c0mean _vsd=_c0sd _vmedian=_c0median _vq1=_c0q1 _vq3=_c0q3 _vmin=_c0min _vmax=_c0max _vcv=_c0cv _vgmean=_c0gmean _vgcv=_c0gcv _vglo=_c0glo _vghi=_c0ghi));
  keep param avisit _col _c0n _c0mean _c0sd _c0median _c0q1 _c0q3 _c0min _c0max _c0cv _c0gmean _c0gcv _c0glo _c0ghi;
run;
%ls_stats(data=work._an, out=work._cs1, var=chg, trt=_col, by=param avisit, keepraw=Y);
data work._cs1;
  set work._cs1(rename=(_vn=_c1n _vmean=_c1mean _vsd=_c1sd _vmedian=_c1median _vq1=_c1q1 _vq3=_c1q3 _vmin=_c1min _vmax=_c1max _vcv=_c1cv _vgmean=_c1gmean _vgcv=_c1gcv _vglo=_c1glo _vghi=_c1ghi));
  keep param avisit _col _c1n _c1mean _c1sd _c1median _c1q1 _c1q3 _c1min _c1max _c1cv _c1gmean _c1gcv _c1glo _c1ghi;
run;
data work._k1;
  length _rowid $36 _label _pagelbl $200 _v $200;
  merge work._f(in=_in) work._cs0 work._cs1;
  by param avisit _col;
  if _in;
  array _nn{6} _n1-_n6;
  array _ee{6} _e1-_e6;
  _rowid = '5772a1b5-5293-437a-8de7-fe7835f0e5b1';
  _page = _o1;
  _pagelbl = 'Parameter: ' || strip(param);
  _k0 = 1;
  _k1 = _o2; _k2 = 0;
  _label = strip(avisit);
  if _col = 1 then _v = strip(ifc(missing(sum(_c0n, 0)), '-', %ls_num(sum(_c0n, 0), 0)));
  else if _col = 2 then _v = strip(ifc(missing(_c0mean), '-', %ls_num(_c0mean, 1))) || ' (' || strip(ifc(missing(_c0sd), '-', %ls_num(_c0sd, 2))) || ')';
  else if _col = 3 then _v = strip(ifc(missing(_c1mean), '-', %ls_num(_c1mean, 1))) || ' (' || strip(ifc(missing(_c1sd), '-', %ls_num(_c1sd, 2))) || ')';
  else if _col = 4 then _v = strip(ifc(missing(sum(_c0n, 0)), '-', %ls_num(sum(_c0n, 0), 0)));
  else if _col = 5 then _v = strip(ifc(missing(_c0mean), '-', %ls_num(_c0mean, 1))) || ' (' || strip(ifc(missing(_c0sd), '-', %ls_num(_c0sd, 2))) || ')';
  else if _col = 6 then _v = strip(ifc(missing(_c1mean), '-', %ls_num(_c1mean, 1))) || ' (' || strip(ifc(missing(_c1sd), '-', %ls_num(_c1sd, 2))) || ')';
  keep _rowid _label _page _pagelbl _k0 _k1 _k2 _col _v;
run;

data work._cells; set work._k1; run;
proc sort data=work._cells; by _page _pagelbl _k0 _k1 _k2 _rowid _label _col; run;
proc transpose data=work._cells out=work._wide(drop=_name_) prefix=col;
  by _page _pagelbl _k0 _k1 _k2 _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 ('5772a1b5-5293-437a-8de7-fe7835f0e5b1');
  _k0 = _ord; _k1 = 0; _k2 = 0;
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 _k1 _k2; 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-4-3.rtf" style=journal;
title1 j=l "ONCO-EX" j=r "Page ~{thispage} of ~{lastpage}";
title2 j=c "Table 14.3.4.3";
title3 j=c "Summary of Vital Signs by Visit";
title4 j=c "Safety Analysis Set";
footnote1 j=l "Change: from baseline.";
footnote2 j=l "Source: ADVS.";
footnote3 j=l "Program: t-14-3-4-3.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 "n" style(column)={cellwidth=10% just=c} style(header)={just=c};
  define col2 / display "Mean (SD)" style(column)={cellwidth=10% just=c} style(header)={just=c};
  define col3 / display "Change|Mean (SD)" style(column)={cellwidth=10% just=c} style(header)={just=c};
  define col4 / display "n" style(column)={cellwidth=10% just=c} style(header)={just=c};
  define col5 / display "Mean (SD)" style(column)={cellwidth=10% just=c} style(header)={just=c};
  define col6 / display "Change|Mean (SD)" 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;