Date: Fri, 4 Feb 2005 16:17:26 -0500
Reply-To: "Kraan, Egon" <ekraan@BeechAcres.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Kraan, Egon" <ekraan@BeechAcres.org>
Subject: Billing Data question
Content-Type: text/plain; charset="iso-8859-1"
Dear List
I have billing data where every record represents a billing event for a
customer. I am trying to select the intake date for the most current
treatment episode (series of events), however the data only gives me the
billing dates. I could select the first billing date for any given client,
but some of this clients have received treatment multiple times. So I am
defining new intakes if there has been a gap of billing activity longer than
6 weeks.
What I need to do, then, is select the first date of the newest treatment
episode.
Data looks like this.
FULLNAM SOCSECNO SVC DATE
Schmoe, Joe 123456789 CSP
01/01/2002
Schmoe, Joe 123456789 PH
01/02/2002
Schmoe, Joe 123456789 CSP
01/14/2002
Schmoe, Joe 123456789 PH
01/29/2002
Schmoe, Joe 123456789 CSP
02/01/2002
Schmoe, Joe 123456789 CFT
08/04/2002 <= Newest intake
Schmoe, Joe 123456789 CSP
08/06/2002
Schmoe, Joe 123456789 CSP
09/17/2002
Schmoe, Joe 123456789 CFT
09/28/2002
Schmoe, Joe 123456789 CSP
10/05/2002
Schmoe, Joe 123456789 CFT
10/21/2002
Schmoe, Joe 123456789 CSP
10/30/2002
Schmoe, Joe 123456789 PH
11/01/2002
Schmoe, Joe 123456789 CSP
11/09/2002
Schmoe, Jane 987654321 CFT
01/01/2002 <= New Intake
Schmoe, Jane 987654321 CSP
02/03/2002
Schmoe, Jane 987654321 CFT
03/04/2002
Schmoe, Jane 987654321 CSP
04/05/2002
Schmoe, Jane 987654321 CFT
05/06/2002
Schmoe, Jane 987654321 CFT
06/07/2002
Schmoe, Jane 987654321 CSP
07/09/2002
Schmoe, Jane 987654321 CFT
08/11/2002
So what I need is select the intake date for the newest treatment episode,
and not necessarily the first billing date.
Please help with this.
Thanks
Egon
======================================
Egon Kraan
Beech Acres
Program Evaluation & Quality Improvement
ekraan@BeechAcres.org
http://www.beechacres.org
|