LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (January 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 23 Jan 2009 05:50:01 -0500
Reply-To:   Annie Lee <hummingbird10111@HOTMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Annie Lee <hummingbird10111@HOTMAIL.COM>
Subject:   flag multiple patient visits

Hi,

I would like to know how to flag patients multiple visits by dischargedate per id. The data set has id and dischargedate. Some patients have more than one visit (for example id=6 and id=10). I would like to flag multiple visits by dischargedate per id. If there were only two visits then first.id and last.id would have been fine. I would appreciate it if anyone would offer some help. Thank you.

data:

id dischdate 1 20030820 2 20040818 3 20050711 4 20050619 5 20050713 6 20030409 6 20050223 6 20050321 6 20050529 6 20060112 7 20050719 8 20051019 9 20031009 10 20040414 10 20040520

Results:

multstay id dischdate 1 1 20030820 1 2 20040818 1 3 20050711 1 4 20050619 1 5 20050713 1 6 20030409 2 6 20050223 3 6 20050321 4 6 20050529 5 6 20060112 1 7 20050719 1 8 20051019 1 9 20031009 1 10 20040414 2 10 20040520


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