Finding Patient Readmits

Reply
Regular Contributor
Posts: 164

Finding Patient Readmits

Hello

I'm using SAS 9.1. I imported data from the hospital software system where one line of data is one patient visit.

What I want to do is, using the health card number, show # of readmits per patient within my organization (which is comprised of many hospitals).

I am assuming I'll need to sort the data in discharge date order so that I can calculate current admit date with previous discharge date to see if there was a readmit. I'll want to know # of readmits in 7 days, 14 days, 21 days, 30 days and greater than 30 days PER that one patient.

How would I also be able to add other information per the readmit i.e. main diagnosis etc.?

Is this possible and if so, how? Thanks.
Super Contributor
Super Contributor
Posts: 3,174

Re: Finding Patient Readmits

Suggest you start out by sorting your SAS dataset in some desired BY variable order, then analyze your observations using IF FIRST. to track the variable(s) that indicate a "readmit" condition. And use the INTCK function to derive a "days since last admitted" and count your "# of readmits".

The additional "other information" is going to be up to your data, as well.

You are going to want to get your feet wet with some straightforward DATA step programming - some links are provided below from the SAS support http://support.sas.com/ website.


Scott Barry
SBBWorks, Inc.


Step-by-Step Programming with Base SAS(R) Software
http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001310736.htm

SAS Language Concepts - How the DATA Step Identifies BY Groups
http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000761931.htm

SAS Language Dictionary: INTCK function
http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a000212868.htm
Regular Contributor
Posts: 164

Re: Finding Patient Readmits

Believe it or not I still haven't been able to figure this out yet. Even if I could just start off with finding cases of patients readmitted within 30 days I'd be happy. I haven't been working with SAS much over the last few years so really rusty...can someone please provide assistance?

Note that I do know how to sort the data by the patient unique identifier of chartno but that is about it. The data has admit date and disch date in it as well.

Thanks.
Super User
Posts: 11,134

Re: Finding Patient Readmits

Here's a rough skeleton of what I think you're asking:

Assuming you have an ID variable (patient number, health card, what ever) and that the date of admission is a SAS date value:

Proc sort data=[your data set name]; by patient_id admin_date;run;
/* or what ever you have named your ID and date variables*/

Data [new data set name];
set [your data set name];
by patient_id;
last_admin_date=lag(admin_date);
date_dif = admin_date - last_admin_date;
/* create some 0/1 coded variables to get counts by summing*/
if first.patient_id 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;
label
readmin_7 = 'Readmit within 7 days'
readmin_14 = 'Readmit within 14 days'
readmin_21 = 'Readmit within 21 days'
readmin_30 = 'Readmit within 30 days'
readmin_more= 'Readmit more than 30 days'
;
format admin_date last_admin_date mmddyy10.;
run;
/* you could drop the last_admin_date and the date_dif variables after your
comfortable they are working correctly. */

/* get a count by visit of each readmin group*/
proc tabulate data=[new data set name];
class patient_id;
var readmin_7 readmin_14 readmin_21 readmin_30 readmin_more;
table patient_id='Patient,
(readmin_7 readmin_14 readmin_21 readmin_30 readmin_more)*sum='';
run;
Ask a Question
Discussion stats
  • 3 replies
  • 546 views
  • 0 likes
  • 3 in conversation