Date: Wed, 18 Apr 2007 12:55:35 -0700
Reply-To: "Miller, John" <millerj@WSIPP.WA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Miller, John" <millerj@WSIPP.WA.GOV>
Subject: Re: Help mining data
Content-Type: text/plain; charset="US-ASCII"
This might give you some ideas:
*-> Select the providers;
Data SelectedProviders1;
Set HospitalDischarges;
Array diag(7) diag1-diag7;
Do I = 1 to 7;
If diag(i) in('111', '222', '333', '444') then output;
End;
Keep ProviderNumber;
Run;
*-> Create a unique list of providers;
Proc sort data= SelectedProviders1 out= SelectedProvidersUnique
noDupKey;
By ProviderNumber;
Run;
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
donnelly.ryan.m@gmail.com
Sent: Wednesday, April 18, 2007 11:48 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Help mining data
Hello all...I'm relatively new to SAS and I just found this group. I
hope you can help me because i know I'm going to need it in the coming
years!
Here's my problem. I have a data set of hospital administrative
discharge records. Each hospital has a distinct provider number and
there are multiple (thousands) of records per provider. What I'm
trying to do it loop through a set of 7 variables to determine if
certain codes are present then create a data set that contains the
provider number and if that code was found in the original data set.
I hope I've been clear enough so that someone can help.
Ryan