关于计划外访视编号的程序
形如上图
--------额外的附加编号--------
data sv5;
set sv4;by _usubjid;
retain visit_r 0;
if first._usubjid then visit_r=visitnum1;
if missing(visitnum1) then visitnum1=visit_r+0.01;
visit_r=visitnum1;
run;
-----------------额外的访视名称-------------
data sv6;set sv5;
by _usubjid;
retain ttt;
if first._usubjid then ttt=visit1;
if missing(visit1) then visit1=ttt;
ttt=visit1;
run;