Hi!
I am not sure if this is the right place to ask this type of question, but here I go. So currently, the SAS program I use generate a random sample of the event/outcome of interest for review. The process is quite manual, because once the review is complete, I have to update the status of those charts (e.g. review requested, review complete etc.) manually and make sure that they are excluded from the sample pool for next review. Also, I change LocID for a specific site.
Here’s the sample code I currently use. PT is the name of one of the domains where the data is getting pulled from for this particular event/outcome (A).
data study; set study1.PT (keep=subjID DOV ptterm LocID ptnum visit adddat);
where visit='A' and locID in (1 18 35 60 25 45 77);
if subjID in ( ) then review='Review Done ' ; else
if subjID in ( ) then review='Review Requested '; else
if ptnum in ( ) then review='Review Done '; else
if ptnum in ( ) then review='New info since last review'; else
review='Review Not Requested';
label review='Review Status';
run;
proc print data=study noobs label;
var subjID ptnum DOV ptterm review; where locID=77; run;
proc surveyselect data=study method=srs out=out seed=1025 n=5;
where locID=77 and review not in ('Done' 'Requested'); run;
proc print noobs label data=study; var subjID ptnum DOV ptterm; run;
I wonder if there is a way to make this step/process less manual, or to make it more efficient in general. Macro is the first thing that came to mind, but not sure about how to.
Any comments/feedback would be greatly appreciated!