Date: Wed, 2 Feb 2011 13:20:29 -0800
Reply-To: Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject: Re: Help for Coding problem
Content-Type: text/plain; charset=us-ascii
Make a multi-dimensional array (or just three regular arrays if you prefer) with a lower bound of '01jan2010'd and an upper bound of '31dec2010'd. Use one array element for each drug. For each mem_id, fill the arrays using the fill date and, drug name, and days supply info. After the arrays are filled for the member, iterate through to find the days when all three drugs were prescribed. Clear to arrays and move on to the next member.
This is similar to the approach taken in <http://www.sascommunity.org/wiki/Drug_Days>, but your problem is more complicated.
This question is in a general class of eligibility questions that come up all the time. I'm surprised SAS hasn't written a proc to handle them.
On Feb 2, 2011, at 12:12 PM, Nancy Li wrote:
> Hi dear SAS-Lers,
> I have encountered a coding problem and would like to know whether anyone on the list could help me.
> My goal is to find patients who are concurrently taking 3 or more medications(different drug names) over a 6 month time period in 2010. I need to look at the fill date along with the days supply to determine if there is any overlap between at least 3 different med scripts in a continuous 6 month period for a given patient. The following is the example data, any help would be highly appreciated!
> Mem_id Fill_date Drug Name Days_supply
> 1B 15FEB2010 GLYBURIDE-METFORMIN HCL 90
> 1B 17MAY2010 GLYBURIDE-METFORMIN HCL 90
> 1B 17JUN2010 ACTOPLUS MET 90
> 1B 17JUN2010 JANUMET 90
> 1B 07JUL2010 ACTOPLUS MET 90
> 1B 02NOV2010 GLYBURIDE-METFORMIN HCL 90
> 2B 17JUN2010 JANUMET 90
> 2B 07JUL2010 ACTOPLUS MET 90
> 2B 02NOV2010 GLYBURIDE-METFORMIN HCL 90
> 3B 15FEB2010 GLYBURIDE-METFORMIN HCL 90
> 3B 17MAY2010 GLYBURIDE-METFORMIN HCL 90
> 3B 17JUN2010 ACTOPLUS MET 90