PK Parameter Table Program

PK Parameters Table Demo

***************************************************************************
** Program: t1-adpp.sas
** Author: DataCeutics, Inc.
** Language/Version: SAS/9.4
** CR Toolkit Version: 2.5.3
** Copyright DataCeutics, Inc 2018
** Description: PK parameters table demo
** Macro Calls: %formatm %table3 %table4
*****************************************************************************;
options mprint nobyline;
ods escapechar='~';
ods proclabel = "Summary of Plasma Drug PK Parameters";

*get paarameter data;
data adpp;set adam2.adpp;
	where ittfl='Y';
	if paramcd =: 'AUC' then aval = round(aval, .01);
	else aval = round(aval, .1);
	if aval > 0;
	label aperiod = 'Study Period'
		trtp = 'Treatment'
		aval = '~'
		trtpn = '~'
	;
run;

*create summary table;
%table3(in=adpp,
	dose=trtpn,
	dosefmt=trtp,
	column=trtpn,
	pageby=aperiod,
	row=param=46,
	result=aval,
	reset=param,
	statlen=26,
	totalg=n,
	stats= N=n
		stat1=<stats=mean std code=trim(left(mean))||" ("||trim(left(std))||")" label="Mean (SD)">
		cv=<CV % Mean>
		gmean=<Geometric Mean>
		logcv=<CV % Geometric Mean>
		median=<Median>
		stat2=<stats=min max code=trim(left(min))||", "||trim(left(max)) label="Min, Max">,
	defwid=24,
	props=list missing spanrows,
	ods_dest=pdf8,
	ods_chars=17,
	ods_cunit=in,
	driver=titles.txt,
	docline=lastfoot,
	suffix=01);
	
*add paramn to order parameters;
data adpp;
	set adpp;
	where paramcd in ('TMAX' 'CMAX' 'AUCIFO');
	if paramcd='TMAX' then paramn=1;
	if paramcd= 'CMAX' then paramn=2;
	if paramcd= 'AUCIFO' then paramn=3;
	label paramn = 'Parameter';
	param = tranwrd(param, ' )', ')');
run;

*build format for paramn;
%formatm(ds=adpp, code=paramn, decode=param, fmtname=pfmt);

data adpp;
	set adpp;
	format paramn pfmt.;
run;

ods proclabel = "Transposed Summary of Plasma Drug PK Parameters TMAX, CMAX, AUCIFO";

%table4(in=adpp,
	pageby=aperiod,
	dose=trtpn,
	dosefmt=trtp,
	row= trtp paramn=16,
	result=aval,
	defwid=10,
	change=none,
	reset=paramn,
	totalg=n,
	stats= N=n mean=Mean std=SD cv= gmean= logcv= median=Median min=Minimum max=Maximum,
	ods_dest=pdf8,
	ods_chars=15,
	ods_cunit=in,
	props=list missing spacing=2 spanrows,
	driver=titles.txt,
	squeeze=n,
	docline=lastfoot,
	suffix=02);