anobel / icdtohcc

Generating Medicare HCC codes from ICD codes
GNU General Public License v3.0
3 stars 4 forks source link

Applying Hierarchies #1

Closed anobel closed 8 years ago

anobel commented 8 years ago

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?

anobel commented 8 years ago

related discussion @ https://github.com/jackwasey/icd/issues/31

anobel commented 8 years ago

a functional solution in 09e5ad4ffc4d120280652846194c32be6194146f may return to it for a faster solution, need to test with 10+ million records