ICD codes – Analysing hospitilisations
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
A brief first post on what I hope will be a series of posts on analysing hospitilisation data, which is recorded using ICD codes (International Statistical Classification of Diseases and Related Health Problems)
Initially here is an R file. This can be read in and will create a list, 218 long, forming groupings using sub chapters of the ICD coding systems. With this you can then loop through your file of hospitilisations doing string searches (which sadly isn’t R’s strength really), and get counts of how many times your subjects are hospitilised for causes.
http://www.fileden.com/files/2010/9/21/2974895//icd_function.R
I’m still working on my string searching code but it is coming along nicely, so I will post this shortly and hopefully have some rough times for how long they take to run on different datesets. Currently I’m working with two files, 1.7 mil and 1.3 mil rows, with up to 21 diagnosis codes per record (row).
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.