LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 2 Aug 2008 10:09:53 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>"
              <schreier.junk.mail@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>"
              <schreier.junk.mail@GMAIL.COM>
Subject:      Re: Help with Array for Healthcare Claims Analysis

On Wed, 30 Jul 2008 09:53:51 -0500, sas 9 bi user <sas9bi@GMAIL.COM> wrote:

>All - A while ago Howard assisted me re the below solution. I am trying to >add a new business rule to an array that he created and am not getting >anywhere. I work in healthcare analytics. I want to do a study where a >member needs to be eligible for 30 days or less after the claim. So below I >have a claim file and a eligibility file. A while ago I provided the claims >and eligibility datasets and Howard kindly came up with the data set called >'new', as created int he array below. It is a wonderful array that >calculates if a member has continuous coverage for 30 days after a claim. >If the member has 30 days continuous coverage, then the member would be in >my study. > >However, I have one new requirement and I wonder how I would code this new >requirement? The new requirement is - the member can have a break in their >eligibility of 2 days max, but only once, and the member must be eligible 30 >days total (2 days allowed gap, though only once). So they should really >have 28 days real eligibility coverage and the +2 gap days. > >For eg, take a look at member number 111 below. This mbr has a claim on >1/27/08. The member has eligibility 1/1/08 thru 1/31/08, then new coverage >2/3/08 through 12/31/08. So this member has a gap of 2 days and was also >eligible for 30 days (given that a gap of 2 days is allowed). > >I can't figure out how to alter the nice array below to allow for a gap of 2 >days max and find members who are eligible for 30 days? I want this member >111 to be in my study since the member's gap is 2 days or less and only >once. I cant figure out how to account for their gap of 2 days. Now member >112, this member has 2 gaps, and I dont want this member to be in the final >dataset because they do have 30 days of coverage if you count the gap of 2 >days or less, but this member's had 2 days of gap coverage but they occurred >on two different points in time and I can only allow one gap - else the >member is no in the study. > >Any thoughts? I graciously thank anyone for assistance.

The array is just a mirror of the data in the ELIGIBILITY table. Since that table is not changing, you don't want to change anything in the array. Since the decision is still based on the 30-day window (actually 31, counting both end points), that should not change either. What should change is the criteria which apply to those days. So take out this block:

do day = date_of_claim to date_of_claim + 30; if missing( ee(day) ) then not30 = 1; end; if not30 then continue;

and replace it with:

do day = date_of_claim to date_of_claim + 30; if missing( ee(day) ) then do; * gap day; if day = date_of_claim or not missing( ee(day-1) ) then do; * new gap; how_many_gaps = sum(how_many_gaps,1); this_gap_length = 0; end; this_gap_length + 1; max_gap_length = max(max_gap_length, this_gap_length); end; end; if how_many_gaps>1 or max_gap_length>2 then continue;

It's a little longer and more complicated because the business rule is more complicated.

> >data claims; >input >mbrid date_of_claim mmddyy11.; >format date_of_claim date9.; >datalines >; >111 01/27/2008 >112 01/27/2008 >123 01/05/2008 >456 01/03/2008 >789 01/06/2008 >789 01/31/2008 >888 01/04/2008 >999 01/20/2008 >; >run; >data eligibility; >input mbrid effective mmddyy11. term mmddyy11.; >format effective term date9.; >datalines >; >111 01/01/2008 01/31/2008 >111 02/03/2008 12/31/2008 >112 01/01/2008 01/31/2008 >112 02/02/2008 02/08/2008 >112 02/10/2008 12/31/2008 >123 01/01/2008 01/31/2008 >123 04/01/2008 12/31/2099 >456 01/01/2008 02/29/2008 >456 03/01/2008 03/31/2008 >789 01/01/2008 01/31/2008 >789 02/01/2008 02/29/2008 >888 03/01/2007 01/31/2008 >888 03/01/2008 12/31/2008 >999 01/01/2008 01/31/2008 >; >run; > >data new(keep = mbrid date_of_claim); > array ee(60000); > do until (last.mbrid); > set eligibility(in=in_eligibility) > claims (in=in_claims); > by mbrid; > if in_eligibility then do day = effective to term; ee(day) = 1; end; > if in_claims then do; > do day = date_of_claim to date_of_claim + 30; > if missing( ee(day) ) then not30 = 1; > end; > if not30 then continue; > output; > end; > end; > run;

[snip]


Back to: Top of message | Previous page | Main SAS-L page