From: Mike Zdeb on 25 Jan 2010 12:18 hi ... instead of merging files, how about using the grouping file to make a format ... I'm assuming your 3rd line is incorrect and data file always is the start then end of a group (if not, then you could modify the following to check for that condition and reverse the start/end of the groups) data fmt; retain fmtname '$pr2grp'; infile datalines dsd; input (start end) (: $5.) label : $1.; datalines; 61106,61110,1 61230,61230,2 64550,64590,3 ; run; proc format cntlin=fmt; * in case you want to see the format you create ... use SELECT; select $pr2grp; run; then use the format to assign a procedure to a group ... prgroup = put(proc,$pr2grp.); if the procedure codes are numeric in your data set, just make a numeric format data fmt; retain fmtname 'pr2grp'; infile datalines dsd; input start end label : $1.; datalines; 61106,61110,1 61230,61230,2 64550,64590,3 ; run; proc format cntlin=fmt; select pr2grp; run; if you want the group variable to be numeric, change the assignment statement prgroup = input(put(proc,$pr2grp.),best.);; -- Mike Zdeb U(a)Albany School of Public Health One University Place Rensselaer, New York 12144-3456 P/518-402-6479 F/630-604-1475 > 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! >
From: adjgiulio on 25 Jan 2010 13:28 On Jan 25, 8:29 am, susan.lo...(a)CIGNA.COM (Susan Logan) wrote: > 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! Aside from the how to question, I'd suggest you look into BETOS codes. It's a free grouping methodology with a couple of levels of aggregation for CPTs and HCPCs. http://www.cms.hhs.gov/hcpcsreleasecodesets/20_betos.asp Giulio
From: =?ISO-8859-1?Q?Daniel_Fern=E1ndez?= on 25 Jan 2010 14:34 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(a)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! >
|
Pages: 1 Prev: need info regarding forecasting presentation Next: Access to OLEDB Question |