Date: Fri, 22 May 2009 11:21:00 -0500
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: how to code my question?
Content-Type: text/plain; charset=ISO-8859-1
Easiest: output the dataset as a vertical dataset (so instead of
111 X A Z B
and then sort nodupkey, and then proc transpose them back (actually, if you
don't mind a lot of warnings, you can skip the sort).
On Fri, May 22, 2009 at 11:14 AM, Ruby <email@example.com> wrote:
> Hello SAS experts,
> I am really stuck on this question please help me if you have good
> idea to code my question in SAS. Thanks a lot.
> I have a dataset with patient ID and each test results info. And also
> it is possible for each patient have multiple records to show the test
> results on different dates. Now, what I need to find a sorted unique
> test results based on a redefined priority list of test results for
> each patient, for example, A,B,C...
> simplified current dataset
> ID T1 T2 T3 T4...
> 111 X A Z B
> 222 A B C
> 222 B A A O
> 222 C
> 333 X A
> desired output dataset
> ID S1 S2 S3...
> 111 A B X Z...
> 222 A B C O ...
> 333 A X...