Date: Mon, 25 Jan 2010 20:34:17 +0100
Reply-To: Daniel Fernández <fdezdan@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Daniel Fernández <fdezdan@GMAIL.COM>
Subject: Re: grouping medical procedure codes using ranges of codes
In-Reply-To: <201001251629.o0PGKaqg019763@malibu.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
hi Susan,
this would be the idea to apply :
proc sql;
create table need as
select a.*, b.proc_code
from have_table a, proc_code_list_table b
where b.start <= a.procedure_code <= b.end;
quit;
Daniel Fernandez.
Barcelona
2010/1/25 Susan Logan <susan.logan@cigna.com>:
> Hi,
> I need to categorize clinical procedure codes into larger procedure code
> categories. I downloaded a dataset of ranges of procedure codes that fall
> into 200 different categories.
>
> I am having trouble linking the procedure code grouping to the procedure
> code because the downloaded dataset gives a range of procedure codes. For
> instance, the fields are start, end, and proc_group. Examples of the
> values are:
> 61106,61110,1
> 61230,61230,2
> 64590,64550,3
>
> If the procedure code in my dataset is 61107, it would be grouped as
> proc_group=1. It follows that if the proc code is 61230, it would be
> assigned in proc_group=2, and so on.
>
> I need a SAS code (or SQL) to link the 2 datasets. Can anyone help with
> this? Thanks!
>
|