How to generate ICD9 table

May 19, 2010
By

This post was kindly contributed by SAS Analysis - go there to comment and to read the full post.


data icd;
infile 'http://within.dhfs.state.wi.us/helpfiles/dlookupbrowse.html' truncover;
input star code $5. description $100.;
if anyalpha(substr(code, 5, 1))=1 then addon=substr(code, 5, 1);
run;

data icd1;
set icd nobs=nobs;
code=compress(code, addon);
description=trim(left(addon)) || trim(left(description));
description=propcase(description);
drop addon star;
if _n_=nobs or _n_= (nobs-1) then delete;
run;



This post was kindly contributed by SAS Analysis - go there to comment and to read the full post.

Tags: , ,

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

Sponsors





Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: tal.galili@gmail.com
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.