yubin-park / hccpy

A Python implementation of Hierarchical Condition Categories
Apache License 2.0
97 stars 59 forks source link

HCC V28 #54

Closed ronnie-canopy closed 1 year ago

ronnie-canopy commented 1 year ago

Are there plans to add the V28 updates soon per the advance notice linked below? https://www.cms.gov/files/document/2024-advance-notice.pdf.

I am happy to contribute to this work if updates are planned.

dr00b commented 1 year ago

@ronnie-canopy Yes, we intend to start work as soon as the SAS model is released. In the interim, hoping to crowdsource a bit to get to an exhaustive, high quality test-set. Stay tuned!

dr00b commented 1 year ago

@ronnie-canopy see #56 :)

ronnie-canopy commented 1 year ago

I've already added code to the Python for a V28 using the model that was released based on the Advance Notice. I've tested this on a sample of about 5000 members (no ESRD and no C-SNP) and I match on all but 4 cases against the output of an Excel V28 HCC model from EpiSource.

The 4 cases are where we suspect EpiSource did not code for the footnote on page 53 of the advance notice I coded for this ‘interaction’ based on CMS SAS macro for the model V2823T2M: %*heart interaction patch; IF CC223 = 1 AND MAX(CC221, CC222, CC224, CC225, CC226) = 0
THEN CC223 = 0;

image

I will try to share in a few days - I'm new to GitHub and not a seasoned Python programmer. I've also altered the code to build in the normalization factors and the MA coding pattern adjustment, and thus also present a pricing RAF in the JSON output.

yubin-park commented 1 year ago

@ronnie-canopy Please check the latest master branch of this project. We have the V28 version implemented. Best,