Patient Readmits Specific Group

Reply
Regular Contributor
Posts: 152

Patient Readmits Specific Group

Hello

I am using SAS 9.2.

With BallardW's help, I use the following code to determine readmits in my patient database:

Data readmits;
set work.AllData;
by chartno admdate sepdate;
last_sepdate=lag(sepdate);
date_dif = admdate - last_sepdate;
/* create some 0/1 coded variables to get counts by summing*/
if first.chartno then do;
readmin_7 = 0;
readmin_14 = 0;
readmin_21 = 0;
readmin_30 = 0;
readmin_more= 0;
date_dif = 0;/* 0 days since last visit for first*/
end;
else do;
readmin_7 = (date_dif le 7);
readmin_14 = (date_dif le 14);
readmin_21 = (date_dif le 21);
readmin_30 = (date_dif le 30);
readmin_more= (date_dif gt 30);
end;


format admdate ddmmyy10. sepdate ddmmyy10.
run;

However, now I want it so that the index case for looking for readmits is specific i.e. a certain doctor and certain procedures (prostatectomy).  I tried initially to run the above and then pluck out readmits for the cases but I ended up with visits that aren't related i.e. the index case was a readmit to another visit which I don't want.  Initially I thought I would create a table of just the index cases and then a table of all other visits but I don't know how I would compare the two to determine readmits.

Any assistance greatly appreciated - thanks.

Grand Advisor
Posts: 16,419

Re: Patient Readmits Specific Group

index case for looking for readmits is specific i.e. a certain doctor and certain procedures (prostatectomy).


Are you referring to the index case here or the readmits that are specific? I'm not clear...

At any rate, usually you change your by groupings when you need something like this. I'd need more details to make sure this works in your scenario.

Right now you have the following, and although you don't use admit date and separation date they ensure the data is sorted appropriately.

by chartno admdate sepdate

You can expand this by sorting by doctor/procedure:

by chartno doctor procedure admtdate sepdate

and then using by.procedure instead of by.chartno to change your specifications. 

Regular Contributor
Posts: 152

Re: Patient Readmits Specific Group

Hi Reeza

I'll provide some sample data soon but just to clarify, I used as you suggested but found that it wasn't calculating the different readmit status of 7, 14, 21 and 30 days, only showing the date_diff time.  Also, the readmit information is attached to the readmit case, not the original case. This is still somewhat useful but what I really want is that the initial case for this doctor/procedure (which I'm calling the index case) has the readmit information attached to it which is why I was wondering whether there should be two data sets merged.

So if chartno 555555 has the criteria of doctor/procedure, then attached to that record is a series of data elements from the 1st readmission, then the second readmission etc.

I don't know if this makes sense and I apologize if it doesn't.  I'll post sample data soon.....

Post a Question
Discussion Stats
  • 2 replies
  • 358 views
  • 0 likes
  • 2 in conversation