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.?
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.
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.
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];
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;
date_dif = 0;/* 0 days since last visit for first*/
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);
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.;
/* 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];
var readmin_7 readmin_14 readmin_21 readmin_30 readmin_more;
(readmin_7 readmin_14 readmin_21 readmin_30 readmin_more)*sum='';