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 (March 2011, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 4 Mar 2011 08:16:37 -0800
Reply-To:     Irin later <irinfigvam@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Irin later <irinfigvam@YAHOO.COM>
Subject:      Re: Confusing Dedup code
Content-Type: text/plain; charset=utf-8

I am grouping within the same ID .   This is within every groups of the same patient ID . In other words , similar scenarios might happen for groups of patient  with ID =12A or ID=13A or  ID=14A or whatever ID.  id   12a 12a 12a   13a 13a 13a   14a 14a 14a 14a 14a

--- On Fri, 3/4/11, Data _null_; <iebupdte@gmail.com> wrote:

From: Data _null_; <iebupdte@gmail.com> Subject: Re: Confusing Dedup code To: "Irin later" <irinfigvam@yahoo.com> Date: Friday, March 4, 2011, 11:07 AM

Should the three scenarios belong to different IDs?  Or are you grouping by TAGs withing IDs?

On Fri, Mar 4, 2011 at 9:56 AM, Irin later <irinfigvam@yahoo.com> wrote: > I am confused with a dedup code….. > -Among the patients with the same ID and criteria tag1=1, one needs first to keep from records with tag1=1 and with the shortest timeframe between Disch_date  and srv_date that follows the hospital discharge. This is the 1st I priority for dedup. > -In case tag1=0, the priority would be tag2=1 with the shortest timeframe > -In case both tag1=0 and tag2=0  one needs to keep the record with the  shortest timeframe > > for example: > Scenarion #1: > id    srv_date     disch_date timeframe tag1   tag2 > 12a  07/15/2010    07/05/2010 10        1      1 > 12a   08/31/2010   08/01/2010 30        0      1 > 12a   03/10/2010   02/16/2010 24        0      1 > 12a   06/24/2010   06/10/2010 14        1      1 > 12a   05/30/2010   03/30/2010 60        0      0 > 12a   09/25/2010   09/05/2010 20        0      1 > I need the following record with tag1=1 and with the shortest timeframe=10 > (rather than timeframe=14) > id    SRV_date    disch_date  timeFrame tag1  tag2 > 12a  07/15/2010   07/05/2010  10        1       1 > > Scenario #2: > id    srv_date    disch_date  timeFrame tag1  tag2 > 12a   08/31/2010  08/01/2010  30        0      1 > 12a   03/10/2010  02/16/2010  24        0      1 > 12a   05/30/2010  03/30/2010  60        0      0 > 12a   09/25/2010  09/05/2010  20        0      1 > I need the following record with tag2=1 and the shortest timeframe=20 > (rather than timeframe=24 or 30) > id    srv_date    disch_date  timeFrame tag1  tag2 > 12a   09/25/2010  09/05/2010  20        0      1 > > Scenario #3 (both tag1 and tag2 =0): > id    srv_date     disch_date timeFrame tag1  tag2 > 12a   09/31/2010   08/01/2010 60        0      0 > 12a   03/14/2010   02/10/2010 34        0      0 > 12a   05/30/2010   03/25/2010 55        0      0 > 12a   10/25/2010   09/15/2010 40        0      0 > I need the following record the shortest timeframe=34 > id    srv_date    disch_date timeFrame tag1  tag2 > 12a   03/14/2010  02/10/2010 34        0      0 > > Could you, please, give me a hand? > > Thank you for advance, > > Irin > > > > >


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