|
|||
|
Thank you for your code!
I will check if it is helpful for me. I posted my question because I was bothered the most by the following finding: Medicaid data has '3153','31530','31531','31532'. The CMS label you mentioned below has only 2 lables as valid ones--the last two: '31531','31532'. These two belong to higher aggregation classification code , 74 other mental. The first three are not valid ICD-9 codes. However, I think that they should not be classified 'missing'. I want to include them as 74 other mental. Do you think that your code help me in fixing that type of errors? Thanks again, Duckhye >>> Jonathan Kerman <jkerman@JHMI.EDU> 02/22/05 2:20 PM >>> I have been doing a fair amount of work with ICD-9 codes. I could provide you with some of what I did. Basically, I checked a text string to make sure it has the format of a valid ICD-9 code, or reject it. I also built a dataset that maps ICD-9 codes to text descriptions. I got my input files from the Centers for Medicare and Medicaid Services at URL: http://www.cms.hhs.gov/paymentsystems/icd9/ After I read these text files, one for diagnosis codes and one for procedure codes, into SAS datasets, this is the code I used to build a single lookup table. It places a decimal point at the proper place, and creates the mapping of codes to descriptions. (I found that there are still some codes that are not found in these CMS files.) See if this helps... ------------------------------------------------------ libname comp "[location with SAS datasets]"; /* Build a lookup table with standardized, short descriptions of ICD-9 codes taken from CMS http://www.cms.hhs.gov/paymentsystems/icd9/ */ data comp.icd9lookup; length CODE tmp $ 6 DESCRIPTION $ 30; set comp.icd9diag (in=diag) comp.icd9proc (in=surg); if diag then do; if substr(code, 1, 1) = 'E' then do; /* for 'E' code diagnoses, the format is different */ substr(tmp, 1, 4) = substr(code, 1, 4); if length(code) > 4 then do; substr(tmp, 5, 1) = '.'; substr(tmp, 6, 1) = substr(code, 5, 1); end; end; else do; /* for numeric ICD-9 diagnoses and for 'V' codes use this format */ substr(tmp, 1, 3) = substr(code, 1, 3); if length(code) > 3 then do; substr(tmp, 4, 1) = '.'; substr(tmp, 5, 2) = substr(code, 4, 2); end; end; end; else if surg then do; /* for procedure codes, use this format */ substr(tmp, 1, 2) = substr(code, 1, 2); if length(code) > 2 then do; substr(tmp, 3, 1) = '.'; substr(tmp, 4, 2) = substr(code, 3, 2); end; end; code = tmp; drop tmp; run; |
|
|
||||
|
||||
|
|
|
|||
|
We found a great deal of variability in codes from claims data. In our
most flexible mathcing algorithm, we tried adding one and then two zeros to the end of codes that didn't match, and subtracting zeros off the end of codes that didn't match. So for 315 we would try 315, 3150, and 31500 For 31500 we would try 31500, 3150, and 315 And for 3150 we would try 3150, 31500, and 315 The easiest way to do this is with formats, but you could also use SET codes KEY=lookupvalue. If the codes were always numeric (not the case here) you could also use SET xxx POINT=numericlookupvalue. In V9, you could use a hash table; I don't know whether that would be faster than using a format, but my guess is that it would. At 03:21 pm 2/22/2005 -0600, Duck-Hye Yang wrote: >Thank you for your code! >I will check if it is helpful for me. > >I posted my question because I was bothered the most by the following >finding: >Medicaid data has '3153','31530','31531','31532'. > >The CMS label you mentioned below has only 2 lables as valid ones--the >last two: '31531','31532'. These two belong to higher aggregation >classification code , 74 other mental. > >The first three are not valid ICD-9 codes. However, I think that they >should not be classified 'missing'. >I want to include them as 74 other mental. ----- Jack Hamilton jfh@alumni.stanford.org Sacramento, California |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to make Forth interesting? | DavidM | Newsgroup comp.lang.forth | 73 | 05-08-2009 06:30 AM |
| Re: EXCEL libname engine update existing sheet. | Gerhard Hellriegel | Newsgroup comp.soft-sys.sas | 0 | 04-02-2009 02:00 PM |
| Re: Include SAS code w/o including SAS code | charles.harbour@ACT.ORG | Newsgroup comp.soft-sys.sas | 0 | 08-13-2008 11:23 PM |
| SCL Joe (was RE: macro structure) | Gregg P. Snell | Newsgroup comp.soft-sys.sas | 0 | 06-27-2006 07:59 PM |
| Documenting sas programs | nevin | Newsgroup comp.soft-sys.sas | 2 | 02-05-2005 08:58 AM |