Date: Tue, 26 Jul 2011 10:44:17 -0500
Reply-To: "Data _null_;" <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Data _null_;" <iebupdte@GMAIL.COM>
Subject: Re: identifying only the ICD 9 E codes in set of 15
Content-Type: text/plain; charset=ISO-8859-1
Are you asking "how to identify ICD 9 E codes contained in arbitrary strings?"
On Tue, Jul 26, 2011 at 10:21 AM, BJ Mattson <firstname.lastname@example.org> wrote:
> I am reviewing and editing a program using hospital discharge data for
> injury anaylses.
> There are 15 diagnosis fields, from primary_diagnosis to diagnosis_15, in
> which 1 or more ICD 9 E codes may appear.
> While I suppose there could be as many as 15 of these E codes, the program
> I am editing has a total of 8 e-code fields defined. What I need to obtain
> is a set of fields which are ONLY the E codes, if present, filled in as
> Ecode 1--Ecode8 with no gaps.
> I suspect using arrays is the way to go, however I'm not quite sure how to
> accomplish shifting the ecodes into the next available spot.
> *So, going from:;
> array dxs (15) $ primary_diagnosis--Diagnosis15;
> array ecodes (8) $ ecode1--ecode8
> ('absent' 'absent' 'absent' 'absent' 'absent' 'absent' 'absent' 'absent');
> * where 'absent' is replaced with the valid e-code, in the order found in
> the initial array of diagnosis;
> Your suggestions are appreciated!
> Thank you.
> BJ Mattson
> Epidemiology Investigator III
> Ohio Department of Health