14-7.01
Summary of Vital Signs at Baseline and End of Treatment
Made 2026-10-17 from uploaded data.
CDISCPILOT01
Table 14-7.01
Summary of Vital Signs at Baseline and End of Treatment
Safety Analysis Set
| n | Mean | SD | Median | Min. | Max. | |
|---|---|---|---|---|---|---|
| Systolic Blood Pressure (mmHg) | ||||||
| AFTER LYING DOWN FOR 5 MINUTES | ||||||
| Placebo | ||||||
| Baseline | 85 | 138.6 | 16.75 | 140.0 | 90.0 | 180.0 |
| Week 24 | 59 | 135.8 | 17.30 | 131.0 | 100.0 | 180.0 |
| End of Trt. | 84 | 134.6 | 19.40 | 132.5 | 88.0 | 180.0 |
| Xanomeline Low Dose | ||||||
| Baseline | 84 | 138.8 | 16.55 | 138.0 | 100.0 | 178.0 |
| Week 24 | 27 | 134.1 | 16.74 | 136.0 | 100.0 | 173.0 |
| End of Trt. | 84 | 135.1 | 17.18 | 131.5 | 102.0 | 190.0 |
| Xanomeline High Dose | ||||||
| Baseline | 84 | 140.1 | 17.82 | 141.0 | 100.0 | 188.0 |
| Week 24 | 30 | 132.2 | 18.18 | 130.0 | 101.0 | 178.0 |
| End of Trt. | 81 | 131.4 | 17.25 | 128.0 | 104.0 | 176.0 |
| AFTER STANDING FOR 1 MINUTE | ||||||
| Placebo | ||||||
| Baseline | 85 | 135.3 | 17.89 | 134.0 | 90.0 | 180.0 |
| Week 24 | 59 | 133.5 | 19.23 | 130.0 | 90.0 | 199.0 |
| End of Trt. | 84 | 130.6 | 17.47 | 130.0 | 84.0 | 172.0 |
| Xanomeline Low Dose | ||||||
| Baseline | 84 | 135.6 | 18.04 | 136.0 | 100.0 | 186.0 |
| Week 24 | 27 | 131.0 | 17.82 | 130.0 | 92.0 | 168.0 |
| End of Trt. | 84 | 131.7 | 17.91 | 130.0 | 99.0 | 180.0 |
| Xanomeline High Dose | ||||||
| Baseline | 84 | 137.3 | 19.71 | 138.0 | 100.0 | 194.0 |
| Week 24 | 30 | 130.4 | 20.83 | 128.0 | 96.0 | 198.0 |
| End of Trt. | 82 | 127.8 | 18.10 | 125.0 | 90.0 | 187.0 |
| AFTER STANDING FOR 3 MINUTES | ||||||
| Placebo | ||||||
| Baseline | 85 | 136.5 | 18.77 | 136.0 | 80.0 | 184.0 |
| Week 24 | 59 | 134.8 | 17.35 | 131.0 | 100.0 | 190.0 |
| End of Trt. | 84 | 131.1 | 19.19 | 130.0 | 80.0 | 176.0 |
| Xanomeline Low Dose | ||||||
| Baseline | 84 | 136.4 | 18.11 | 134.5 | 104.0 | 182.0 |
| Week 24 | 27 | 131.0 | 17.92 | 130.0 | 100.0 | 168.0 |
| End of Trt. | 83 | 132.3 | 17.90 | 130.0 | 98.0 | 200.0 |
| Xanomeline High Dose | ||||||
| Baseline | 84 | 138.8 | 18.75 | 138.0 | 100.0 | 186.0 |
| Week 24 | 30 | 129.2 | 16.95 | 126.0 | 90.0 | 172.0 |
| End of Trt. | 81 | 128.6 | 17.64 | 128.0 | 88.0 | 184.0 |
| Diastolic Blood Pressure (mmHg) | ||||||
| AFTER LYING DOWN FOR 5 MINUTES | ||||||
| Placebo | ||||||
| Baseline | 85 | 75.7 | 11.09 | 76.0 | 40.0 | 99.0 |
| Week 24 | 59 | 72.9 | 11.32 | 74.0 | 44.0 | 109.0 |
| End of Trt. | 84 | 73.8 | 10.43 | 73.0 | 46.0 | 100.0 |
| Xanomeline Low Dose | ||||||
| Baseline | 84 | 76.3 | 9.77 | 76.0 | 57.0 | 100.0 |
| Week 24 | 27 | 76.1 | 9.14 | 76.0 | 60.0 | 90.0 |
| End of Trt. | 84 | 73.3 | 8.93 | 72.0 | 45.0 | 90.0 |
| Xanomeline High Dose | ||||||
| Baseline | 84 | 77.2 | 9.80 | 78.0 | 51.0 | 98.0 |
| Week 24 | 30 | 73.9 | 9.23 | 74.0 | 60.0 | 92.0 |
| End of Trt. | 82 | 73.6 | 9.64 | 73.0 | 50.0 | 94.0 |
| AFTER STANDING FOR 1 MINUTE | ||||||
| Placebo | ||||||
| Baseline | 85 | 77.9 | 10.63 | 78.0 | 51.0 | 104.0 |
| Week 24 | 59 | 74.2 | 12.89 | 74.0 | 45.0 | 117.0 |
| End of Trt. | 84 | 73.9 | 11.80 | 74.0 | 39.0 | 100.0 |
| Xanomeline Low Dose | ||||||
| Baseline | 84 | 76.2 | 10.14 | 78.0 | 54.0 | 98.0 |
| Week 24 | 27 | 76.3 | 10.28 | 78.0 | 60.0 | 98.0 |
| End of Trt. | 84 | 74.2 | 9.31 | 73.5 | 51.0 | 94.0 |
| Xanomeline High Dose | ||||||
| Baseline | 84 | 78.1 | 10.77 | 78.0 | 56.0 | 108.0 |
| Week 24 | 30 | 74.9 | 11.00 | 76.0 | 50.0 | 97.0 |
| End of Trt. | 82 | 76.3 | 11.63 | 77.5 | 48.0 | 112.0 |
| AFTER STANDING FOR 3 MINUTES | ||||||
| Placebo | ||||||
| Baseline | 85 | 77.7 | 11.00 | 78.0 | 46.0 | 110.0 |
| Week 24 | 59 | 74.3 | 11.38 | 74.0 | 51.0 | 110.0 |
| End of Trt. | 84 | 73.5 | 11.20 | 73.5 | 49.0 | 100.0 |
| Xanomeline Low Dose | ||||||
| Baseline | 84 | 76.6 | 10.93 | 76.0 | 48.0 | 108.0 |
| Week 24 | 27 | 76.2 | 10.18 | 76.0 | 57.0 | 98.0 |
| End of Trt. | 83 | 73.9 | 9.47 | 72.0 | 57.0 | 102.0 |
| Xanomeline High Dose | ||||||
| Baseline | 84 | 79.6 | 10.19 | 80.0 | 51.0 | 104.0 |
| Week 24 | 30 | 76.0 | 10.63 | 78.5 | 50.0 | 98.0 |
| End of Trt. | 81 | 76.0 | 11.89 | 78.0 | 50.0 | 118.0 |
| Pulse Rate (beats/min) | ||||||
| AFTER LYING DOWN FOR 5 MINUTES | ||||||
| Placebo | ||||||
| Baseline | 85 | 70.4 | 10.46 | 70.0 | 51.0 | 100.0 |
| Week 24 | 59 | 69.1 | 9.46 | 68.0 | 50.0 | 92.0 |
| End of Trt. | 84 | 70.2 | 11.01 | 68.0 | 50.0 | 104.0 |
| Xanomeline Low Dose | ||||||
| Baseline | 84 | 68.8 | 9.52 | 68.0 | 50.0 | 88.0 |
| Week 24 | 27 | 68.1 | 9.28 | 68.0 | 52.0 | 90.0 |
| End of Trt. | 84 | 67.5 | 10.11 | 68.0 | 48.0 | 100.0 |
| Xanomeline High Dose | ||||||
| Baseline | 84 | 70.1 | 9.27 | 68.0 | 52.0 | 98.0 |
| Week 24 | 30 | 69.3 | 11.88 | 68.0 | 47.0 | 96.0 |
| End of Trt. | 81 | 67.7 | 11.08 | 66.0 | 47.0 | 100.0 |
| AFTER STANDING FOR 1 MINUTE | ||||||
| Placebo | ||||||
| Baseline | 85 | 75.5 | 12.68 | 76.0 | 56.0 | 133.0 |
| Week 24 | 59 | 72.8 | 8.98 | 74.0 | 52.0 | 88.0 |
| End of Trt. | 84 | 74.6 | 10.15 | 75.0 | 52.0 | 108.0 |
| Xanomeline Low Dose | ||||||
| Baseline | 84 | 73.5 | 10.59 | 72.0 | 53.0 | 100.0 |
| Week 24 | 27 | 72.1 | 9.53 | 74.0 | 52.0 | 88.0 |
| End of Trt. | 84 | 73.3 | 10.73 | 72.0 | 51.0 | 104.0 |
| Xanomeline High Dose | ||||||
| Baseline | 84 | 75.0 | 10.89 | 72.0 | 56.0 | 104.0 |
| Week 24 | 30 | 73.4 | 11.93 | 72.0 | 54.0 | 98.0 |
| End of Trt. | 82 | 73.2 | 10.99 | 72.0 | 52.0 | 100.0 |
| AFTER STANDING FOR 3 MINUTES | ||||||
| Placebo | ||||||
| Baseline | 85 | 74.6 | 11.94 | 74.0 | 54.0 | 134.0 |
| Week 24 | 59 | 72.8 | 8.73 | 74.0 | 56.0 | 88.0 |
| End of Trt. | 84 | 74.7 | 9.92 | 75.5 | 52.0 | 100.0 |
| Xanomeline Low Dose | ||||||
| Baseline | 84 | 72.3 | 10.99 | 70.0 | 51.0 | 104.0 |
| Week 24 | 27 | 70.7 | 10.78 | 72.0 | 52.0 | 96.0 |
| End of Trt. | 83 | 71.7 | 9.69 | 72.0 | 53.0 | 97.0 |
| Xanomeline High Dose | ||||||
| Baseline | 84 | 74.0 | 10.76 | 72.0 | 52.0 | 100.0 |
| Week 24 | 30 | 72.4 | 11.92 | 71.5 | 54.0 | 96.0 |
| End of Trt. | 81 | 72.4 | 10.66 | 72.0 | 54.0 | 106.0 |
Program: t-14-7-01.sas
Program t-14-7-01.sas
Version 1, written from Clinwright's patterns, 2026-10-17, checks passed.
/*==== 00-header ====*/
/*----------------------------------------------------------------------------
Output : Table 14-7.01 / Summary of Vital Signs at Baseline and End of Treatment / Safety Analysis Set
Program : t-14-7-01.sas Reporting effort : CSR
ADaM : /work/adam (ADSL, ADADAS, ADCIBC, ADLBC, ADLBH, ADNPIX, ADTTE, ADVS, ADAE, ADCM, ADMH, ADEX)
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
col3 SD
col4 Median
col5 Min.
col6 Max.
/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='552d392b-cdef-4097-bd69-9ede62465ff7'; _kind='label'; _var=''; rowlabel='[Measure]'; _xx1=''; _xx2=''; _xx3=''; _xx4=''; _xx5=''; _xx6=''; output;
_ord=2; _indent=1; _rowid='1c954011-f7ae-4fc1-a043-81867e892943'; _kind='label'; _var=''; rowlabel='[Position]'; _xx1=''; _xx2=''; _xx3=''; _xx4=''; _xx5=''; _xx6=''; output;
_ord=3; _indent=2; _rowid='f8e2fa51-fc0e-4488-b460-bc519e2f8dfb'; _kind='label'; _var=''; rowlabel='[Treatment]'; _xx1=''; _xx2=''; _xx3=''; _xx4=''; _xx5=''; _xx6=''; output;
_ord=4; _indent=3; _rowid='b3ac585f-2e48-45f4-ad2d-124e1985e01b'; _kind='stat'; _var=''; rowlabel='Baseline'; _xx1='xx'; _xx2='xx.x'; _xx3='xx.xx'; _xx4='xx.x'; _xx5='xx.x'; _xx6='xx.x'; output;
_ord=5; _indent=3; _rowid='d3a87e57-6aea-4753-848e-c5e65f88929a'; _kind='stat'; _var=''; rowlabel='Week 24'; _xx1='xx'; _xx2='xx.x'; _xx3='xx.xx'; _xx4='xx.x'; _xx5='xx.x'; _xx6='xx.x'; output;
_ord=6; _indent=3; _rowid='cce3ce46-6590-418e-b8e8-5b0c207e33e5'; _kind='stat'; _var=''; rowlabel='End of Trt.'; _xx1='xx'; _xx2='xx.x'; _xx3='xx.xx'; _xx4='xx.x'; _xx5='xx.x'; _xx6='xx.x'; output;
run;
/*==== 10-data ====*/
/* Made from the output's analysis: the records of ADVS with PARAMCD in ('SYSBP', 'DIABP', 'PULSE') 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'));
_col = 1; output;
_col = 2; output;
_col = 3; output;
_col = 4; output;
_col = 5; output;
_col = 6; output;
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 with PARAMCD in ('SYSBP', 'DIABP', 'PULSE'), of the population's subjects, in each column. */
proc sort data=adam.advs(keep=usubjid saffl trtp trtpn paramcd param paramn atptn atpt avisit aval where=(PARAMCD in ('SYSBP', 'DIABP', 'PULSE'))) out=work._rec; by usubjid; run;
data work._an;
merge work._rec(in=_r) work._pop1(in=_p);
by usubjid;
if _r and _p;
_col = 1; output;
_col = 2; output;
_col = 3; output;
_col = 4; output;
_col = 5; output;
_col = 6; output;
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, names=_lsn1 _lsn2 _lsn3 _lsn4 _lsn5 _lsn6);
/* 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 = _n1;
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 = _n1;
drop _i;
run;
proc sort data=work._g0; by paramn param; run;
data work._g0;
set work._g0;
_o1 = _n_;
run;
/* [Measure] of PARAM. */
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._k1;
length _rowid $36 _label _pagelbl $200 _v $200;
set work._f;
array _nn{6} _n1-_n6;
array _ee{6} _e1-_e6;
_rowid = '552d392b-cdef-4097-bd69-9ede62465ff7';
_page = 1;
_pagelbl = '';
_k0 = 1;
_k1 = _o1; _k2 = 0;
_k3 = 0; _k4 = 0;
_k5 = 0; _k6 = 0;
_label = strip(param);
_v = '';
keep _rowid _label _page _pagelbl _k0 _k1 _k2 _k3 _k4 _k5 _k6 _col _v;
run;
/* Per value of param and atpt: subjects and records per column. */
proc sort data=work._an(keep=usubjid _col param atpt atptn where=(not missing(param) and not missing(atpt))) out=work._u; by param atpt _col usubjid; run;
data work._c;
set work._u;
by param atpt _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 atpt atptn _col _n _e;
run;
proc transpose data=work._c out=work._tn(drop=_name_) prefix=_n; by param atpt atptn; id _col; var _n; run;
proc transpose data=work._c out=work._te(drop=_name_) prefix=_e; by param atpt atptn; id _col; var _e; run;
data work._g2;
merge work._tn work._te; by param atpt atptn;
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 = _n1;
drop _i;
run;
proc sort data=work._g2; by param atptn atpt; run;
data work._g2;
set work._g2;
by param;
retain _r;
if first.param then _r = 0;
_r = _r + 1;
_o2 = _r;
drop _r;
run;
proc sort data=work._g2; by param; run;
proc sort data=work._g0(keep=param _o1) out=work._gp; by param; run;
data work._g2; merge work._g2(in=_in) work._gp; by param; if _in; run;
/* [Position] of ATPT. */
data work._f; set work._g2; do _col = 1 to 6; output; end; run;
proc sort data=work._f; by param atpt _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 = '1c954011-f7ae-4fc1-a043-81867e892943';
_page = 1;
_pagelbl = '';
_k0 = 1;
_k1 = _o1; _k2 = 2;
_k3 = _o2; _k4 = 0;
_k5 = 0; _k6 = 0;
_label = strip(atpt);
_v = '';
keep _rowid _label _page _pagelbl _k0 _k1 _k2 _k3 _k4 _k5 _k6 _col _v;
run;
/* Per value of param and atpt and trtp: subjects and records per column. */
proc sort data=work._an(keep=usubjid _col param atpt trtp trtpn where=(not missing(param) and not missing(atpt) and not missing(trtp))) out=work._u; by param atpt trtp _col usubjid; run;
data work._c;
set work._u;
by param atpt trtp _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 atpt trtp trtpn _col _n _e;
run;
proc transpose data=work._c out=work._tn(drop=_name_) prefix=_n; by param atpt trtp trtpn; id _col; var _n; run;
proc transpose data=work._c out=work._te(drop=_name_) prefix=_e; by param atpt trtp trtpn; id _col; var _e; run;
data work._g3;
merge work._tn work._te; by param atpt trtp trtpn;
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 = _n1;
drop _i;
run;
proc sort data=work._g3; by param atpt trtpn trtp; run;
data work._g3;
set work._g3;
by param atpt;
retain _r;
if first.atpt then _r = 0;
_r = _r + 1;
_o3 = _r;
drop _r;
run;
proc sort data=work._g3; by param atpt; run;
proc sort data=work._g2(keep=param atpt _o1 _o2) out=work._gp; by param atpt; run;
data work._g3; merge work._g3(in=_in) work._gp; by param atpt; if _in; run;
/* [Treatment] of TRTP. */
data work._f; set work._g3; do _col = 1 to 6; output; end; run;
proc sort data=work._f; by param atpt trtp _col; run;
data work._k3;
length _rowid $36 _label _pagelbl $200 _v $200;
set work._f;
array _nn{6} _n1-_n6;
array _ee{6} _e1-_e6;
_rowid = 'f8e2fa51-fc0e-4488-b460-bc519e2f8dfb';
_page = 1;
_pagelbl = '';
_k0 = 1;
_k1 = _o1; _k2 = 2;
_k3 = _o2; _k4 = 3;
_k5 = _o3; _k6 = 0;
_label = strip(trtp);
_v = '';
keep _rowid _label _page _pagelbl _k0 _k1 _k2 _k3 _k4 _k5 _k6 _col _v;
run;
data work._ar; set work._an; where (AVISIT = 'Baseline'); run;
/* Baseline where AVISIT = 'Baseline'. */
data work._f; set work._g3; do _col = 1 to 6; output; end; run;
proc sort data=work._f; by param atpt trtp _col; run;
%ls_stats(data=work._ar, out=work._cs0, var=aval, trt=_col, by=param atpt trtp, 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 atpt trtp _col _c0n _c0mean _c0sd _c0median _c0q1 _c0q3 _c0min _c0max _c0cv _c0gmean _c0gcv _c0glo _c0ghi;
run;
data work._k4;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._cs0;
by param atpt trtp _col;
if _in;
array _nn{6} _n1-_n6;
array _ee{6} _e1-_e6;
_rowid = 'b3ac585f-2e48-45f4-ad2d-124e1985e01b';
_page = 1;
_pagelbl = '';
_k0 = 1;
_k1 = _o1; _k2 = 2;
_k3 = _o2; _k4 = 3;
_k5 = _o3; _k6 = 4;
_label = '';
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)));
else if _col = 3 then _v = strip(ifc(missing(_c0sd), '-', %ls_num(_c0sd, 2)));
else if _col = 4 then _v = strip(ifc(missing(_c0median), '-', %ls_num(_c0median, 1)));
else if _col = 5 then _v = strip(ifc(missing(_c0min), '-', %ls_num(_c0min, 1)));
else if _col = 6 then _v = strip(ifc(missing(_c0max), '-', %ls_num(_c0max, 1)));
keep _rowid _label _page _pagelbl _k0 _k1 _k2 _k3 _k4 _k5 _k6 _col _v;
run;
data work._ar; set work._an; where (AVISIT = 'Week 24'); run;
/* Week 24 where AVISIT = 'Week 24'. */
data work._f; set work._g3; do _col = 1 to 6; output; end; run;
proc sort data=work._f; by param atpt trtp _col; run;
%ls_stats(data=work._ar, out=work._cs0, var=aval, trt=_col, by=param atpt trtp, 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 atpt trtp _col _c0n _c0mean _c0sd _c0median _c0q1 _c0q3 _c0min _c0max _c0cv _c0gmean _c0gcv _c0glo _c0ghi;
run;
data work._k5;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._cs0;
by param atpt trtp _col;
if _in;
array _nn{6} _n1-_n6;
array _ee{6} _e1-_e6;
_rowid = 'd3a87e57-6aea-4753-848e-c5e65f88929a';
_page = 1;
_pagelbl = '';
_k0 = 1;
_k1 = _o1; _k2 = 2;
_k3 = _o2; _k4 = 3;
_k5 = _o3; _k6 = 5;
_label = '';
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)));
else if _col = 3 then _v = strip(ifc(missing(_c0sd), '-', %ls_num(_c0sd, 2)));
else if _col = 4 then _v = strip(ifc(missing(_c0median), '-', %ls_num(_c0median, 1)));
else if _col = 5 then _v = strip(ifc(missing(_c0min), '-', %ls_num(_c0min, 1)));
else if _col = 6 then _v = strip(ifc(missing(_c0max), '-', %ls_num(_c0max, 1)));
keep _rowid _label _page _pagelbl _k0 _k1 _k2 _k3 _k4 _k5 _k6 _col _v;
run;
data work._ar; set work._an; where (AVISIT = 'End of Treatment'); run;
/* End of Trt. where AVISIT = 'End of Treatment'. */
data work._f; set work._g3; do _col = 1 to 6; output; end; run;
proc sort data=work._f; by param atpt trtp _col; run;
%ls_stats(data=work._ar, out=work._cs0, var=aval, trt=_col, by=param atpt trtp, 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 atpt trtp _col _c0n _c0mean _c0sd _c0median _c0q1 _c0q3 _c0min _c0max _c0cv _c0gmean _c0gcv _c0glo _c0ghi;
run;
data work._k6;
length _rowid $36 _label _pagelbl $200 _v $200;
merge work._f(in=_in) work._cs0;
by param atpt trtp _col;
if _in;
array _nn{6} _n1-_n6;
array _ee{6} _e1-_e6;
_rowid = 'cce3ce46-6590-418e-b8e8-5b0c207e33e5';
_page = 1;
_pagelbl = '';
_k0 = 1;
_k1 = _o1; _k2 = 2;
_k3 = _o2; _k4 = 3;
_k5 = _o3; _k6 = 6;
_label = '';
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)));
else if _col = 3 then _v = strip(ifc(missing(_c0sd), '-', %ls_num(_c0sd, 2)));
else if _col = 4 then _v = strip(ifc(missing(_c0median), '-', %ls_num(_c0median, 1)));
else if _col = 5 then _v = strip(ifc(missing(_c0min), '-', %ls_num(_c0min, 1)));
else if _col = 6 then _v = strip(ifc(missing(_c0max), '-', %ls_num(_c0max, 1)));
keep _rowid _label _page _pagelbl _k0 _k1 _k2 _k3 _k4 _k5 _k6 _col _v;
run;
data work._cells; set work._k1 work._k2 work._k3 work._k4 work._k5 work._k6; run;
proc sort data=work._cells; by _page _pagelbl _k0 _k1 _k2 _k3 _k4 _k5 _k6 _rowid _label _col; run;
proc transpose data=work._cells out=work._wide(drop=_name_) prefix=col;
by _page _pagelbl _k0 _k1 _k2 _k3 _k4 _k5 _k6 _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 ('552d392b-cdef-4097-bd69-9ede62465ff7' '1c954011-f7ae-4fc1-a043-81867e892943' 'f8e2fa51-fc0e-4488-b460-bc519e2f8dfb' 'b3ac585f-2e48-45f4-ad2d-124e1985e01b' 'd3a87e57-6aea-4753-848e-c5e65f88929a' 'cce3ce46-6590-418e-b8e8-5b0c207e33e5');
_k0 = _ord; _k1 = 0; _k2 = 0; _k3 = 0; _k4 = 0; _k5 = 0; _k6 = 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 _k3 _k4 _k5 _k6; 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_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-7-01.rtf" style=journal;
title1 j=l "CDISCPILOT01" j=r "Page ~{thispage} of ~{lastpage}";
title2 j=c "Table 14-7.01";
title3 j=c "Summary of Vital Signs at Baseline and End of Treatment";
title4 j=c "Safety Analysis Set";
footnote1 j=l "Program: t-14-7-01.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;
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" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col3 / display "SD" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col4 / display "Median" style(column)={cellwidth=10% just=c} style(header)={just=c};
define col5 / display "Min." style(column)={cellwidth=10% just=c} style(header)={just=c};
define col6 / display "Max." 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;