ICD codes – Analysing hospitilisations

July 14, 2011
By

(This article was first published on Matt's Stats n stuff » R, and kindly contributed to R-bloggers)

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).


To leave a comment for the author, please follow the link and comment on his blog: Matt's Stats n stuff » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , , , , ,

Comments are closed.