Coder Social home page Coder Social logo

icdtohcc's Introduction

ICD to HCC

Generate Medicare Hierchical Condition Categories (HCC) based on ICD codes

Introduction

  • many to many relationship
  • ICD9/10 are mapped to Condition Categories (CC), and a hierarchy based on disease severity is applied to the CCs to generate HCCs.

Data

The ICD/HCC mappings were obtained from CMS. CMS provides SAS macros for assigning HCCs and HCC scores based on ICDs, adjusted annually. We have implemented assigning HCCs (but not scores) in R. The original data is available from CMS, or in the github repository at /crosswalks/originalCMS_xw.

Between 2007-2012, there were 70 HCCs (Version 12). In 2013, this was expanded to 87 (Version 20). We use the labels for the more inclusive mappings (post-2013) for all years for consistency. This means that in pre-2013 data 17 HCCs will be structurally zero.

Source

icdtohcc.R

  • Import condition categories, hierarchy rules, and labels, by year from CMS (for both ICD9/10)
  • Apply CCs and implement hierarchies to generate HCCs, starts with wide patient data, ends with long data Source with markdown

Future Plans

  • split into separate functions
  • ?incorporate into icd package

icdtohcc's People

Contributors

anobel avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

icdtohcc's Issues

Applying Hierarchies

HCCs are defined when a severity hierarchy has been applied to the condition categories (CCs). This hierarchy sometimes differs from year to year. For many purposes, the most inclusive hierarchy is appropriate, but we would like to be able to apply year-specific hierarchies.

In each year, there are situations with overlapping hierarchies that must be applied in successive order. While it would make sense to loop through them, it would be nice to apply this in a vectorized fashion. Efficiency will also be important, as administrative data sets can get quite large. The current data set I'm working with as 12.5million patients, with up to 25 diagnoses per patient.

Also, much of the administrative data with patient diagnoses is in wide format, with many diagnoses per patient (up to 25, on per column). It may be faster to convert this to long format, apply hierarchies, and then covert back to wide format...I'm still experimenting with this aspect. thoughts, @mpdakkak?

rmarkdown -> script

eventually convert the markdown document to an rscipt that can be run. will unchunk and edit comments once major development issues resolved

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.