Syntax question re: hospital readmission flagging

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Syntax question re: hospital readmission flagging

Jason Gillikin
Here's a scenario that's been bedeviling us for a few days.  Can someone
help?
 
We have a data file with 1.2 million cases and 39 variables.  We use
SPSS 13.0, in an acute-care hospital.  The file reflects all discharges
of a specific patient type for the last several years.  
 
We want to develop syntax that allows us to identify patients discharged
within a specified month (variable = discharge_date) who had one or more
readmissions within the last 7, 15, or 30 days, under the same major
diagnostic category (variable = mdc).  Each patient has a unique medical
record number (variable = mrn).
 
Ideally, we would set a flag on every case indicating whether there was
no potentially related readmission found, or whether the case was a
first visit with one or more subsequent readmits.  Readmits would be
flagged as such, although it doesn't matter whether the readmission was
one of one, or one of many (i.e., simply calling it a "readmit" will
suffice).  Potential flags are "no readmit," "first admit," "readmit
within 7 days, "readmit within 15 days," or "readmit within 30 days."
 
Thoughts?

---
Jason E. Gillikin, CPHQ, Measurement & Evaluation Specialist
Access Management Department, MC 157 [640D Towers]
Spectrum Health - Grand Rapids Hospitals, 100 Michigan St. NE, Grand
Rapids MI  49503-2560
Tel/616.391.1639  |  Fax/616.391.3873  |  Cell/269.352.5615
[hidden email]  |  http://www.spectrum-health.org
Reply | Threaded
Open this post in threaded view
|

Re: Syntax question re: hospital readmission flagging

Richard Ristow
At 04:05 PM 6/4/2007, Jason Gillikin wrote:

>We have a data file with 1.2 million cases and 39 variables.  The file
>reflects all discharges of a specific patient type for the last
>several years.
>
>We want to identify patients discharged within a specified month
>(variable = discharge_date) who had readmissions within the last 7,
>15, or 30 days, under the same major diagnostic category (variable =
>mdc).  Each patient has a unique medical record number (variable =
>mrn).
>
>We would set a flag on every case indicating whether there was no
>potentially related readmission found, or whether the case was a first
>visit with one or more subsequent readmits.

This adds a little complexity, because having found later related
readmissions, you need to carry the information back in the file to
give the summary in record for the first admission. More on this,
below.

>Readmits would be flagged as such, although it doesn't matter whether
>the readmission was one of one, or one of many (i.e., simply calling
>it a "readmit" will suffice).  Potential flags are "no readmit,"
>"first admit," "readmit within 7 days, "readmit within 15 days," or
>"readmit within 30 days."

I'm going to change this a little. For each *admission* there's a
status variable:
         Readmt Cat
         1 'First'
         2 'W/in  7 days'
         3 'W/in 15 days'
         4 'W/in 30 days'.

For each *sequence of admissions*, i.e. with at most 30 days between
the discharge date of one and the admit date of the next, there are
also summary variables
<within 7 days>

I will take it that you have 'adm_date' and 'dis_date', which are SPSS
date variables. Hospital stays don't overlap: the discharge date of one
is always earlier than the admission date of the next. Both are pure
date variables, no including a time of day. And neither date is ever
missing.

"Readmit within 7 days", etc., means within 7 days of the latest
previous discharge, not of the discharge after the first admission in
the series.

CAVEAT: None of the following code is tested (no test data). It's
reasonably complicated, and I'm tossing it off once, so it's
practically certain it has some errors. And it's inadequately
documented.

*  I.    Forward scan: Identify *series* of admissions    .......... .

NUMERIC AdmSeries
         AdmNumber   (F4)
        /AdmCatg     (F2).
VAR LABELS
         AdmSeries 'No. for series of connected admissions ' +
                   'w/in Patient, Dx cat'
         AdmNumber 'Admission number w/in admission series'
         AdmCatg   'Readmission category, w/in series'.
VAL LABELS
         AdmCatg
         1 'First'
         2 'W/in  7 days'
         3 'W/in 15 days'
         4 'W/in 30 days'
         9 'LOGIC ERROR'.

SORT CASES BY mrn mdc adm_date.
ADD FILES
   /FILE  = *
   /BY      mrn mdc
   /FIRST = New_Ptnt.

COMPUTE AdmCatg = 9 /* to try to flag logic errors */.
DO IF   New_Ptnt.
.     COMPUTE AdmSeries = 1.
.     COMPUTE AdmNumber = 1.
.     COMPUTE AdmCatg   = 1.
ELSE.
.  COMPUTE   #IntrVal  = CTIME.DAYS(adm_date
                               - LAG(dis_date)).
.  DO IF     #IntrVal GE 30.
.     COMPUTE AdmSeries = 1.
.     COMPUTE AdmNumber = 1.
.     COMPUTE AdmCatg   = 1.
.  ELSE.
.     COMPUTE AdmSeries = LAG(AdmSeries) + 1.
.     COMPUTE AdmNumber = 1.
.     RECODE #IntrVal
       (LO THRU  7 = 2)
       (LO THRU 15 = 3)
       (LO THRU 30 = 4)
          INTO AdmCatg.
.  END IF.
END IF.

*  II.   Backward summary: Summarize the series           .......... .

TEMPORARY.
IF AdmCatg EQ 1  Frst_Vis = 1.
IF AcmCatg EQ 2  Is__LE_7 = 1.
IF AdmCatg EQ 3  Is__8_15 = 1.
IF AdmCatg EQ 4  Is_16_30 = 1.

AGGREGATE
    /OUTFILE= * MODE=ADDVARIABLES
    /BREAK  = mrn mdc AdmSeries
    /N.Admit  'Total admissions, this series'    = NU
    /N.Frst   'No. of "first" admits(shld be 1)' = SUM(Frst_Vis)
    /No..LE_7 'No. of readmits w/in  7 days'     = SUM(Is__LE_7)
    /No..7_15 'No. of readmits w/in  7-15 days'  = SUM(Is__8_15)
    /No.16_30 'No. of readmits w/in 16-30 days'  = SUM(Is_16_30)
    /Start_Dt 'Date series began (1st admission' = MIN(adm_date)
    /End_Dt   'Date series ended (last dischg.)' = MAX(dis_date).

Re-sort, list reorder variables, etc., as you like.