ICD codes – Analysing hospitilisations

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

Below is a link to a file is a ‘dictionary’ for the abbreviated names used in the function above.

http://www.fileden.com/files/2010/9/21/2974895//icd_code_dictionary.xlsx

About these ads

One thought on “ICD codes – Analysing hospitilisations

  1. Pingback: ICD code – search looping « Matt's Stats n stuff

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s