A Python User's Guide to Running the CMS-HCC Risk Adjustment Model
Medicare Advantage plans run the CMS-HCC risk adjustment model to secure accurate CMS payments, pinpoint enrollees with potential HCC discrepancies, and identify high-risk members for targeted disease management. Traditionally, operating CMS's software necessitates a SAS® license. However, MScore™ by riskadjustmentmodel.com presents a streamlined, user-friendly alternative that supports various operating systems and programming languages. This article introduces MScore™ and offers a practical guide for using the software via Python.
Value Proposition of MScore™
MScore™ is a SAS®-free alternative to perform CMS-HCC risk score calculations. It relieves organizations of the burden of coding the risk model and making revisions when a new version is released. MScore™ enables organizations to harness the power of cloud and open-source technologies. It is compatible with both Windows and Linux operating systems, underscoring its versatility. Whether utilized as a desktop application, through a command-line interface (CLI), or via an API integration, MScore™ can be tailored to meet your diverse operational needs.
Highlighted Features of MScore™:
Up-to-Date: Supporting CMS-HCC models from 2021-2024, including v28, MScore™ stays up-to-date with the latest CMS release.
Cross-Platform Compatibility: MScore™ offers an easy-to-use solution that's not limited to a single programming language, OS, or computing environment.
Flexibility: Whether you prefer using a desktop application, CLI, or API, MScore™ caters to diverse technical needs and preferences.
Rich Support: A variety of resources, tutorials, and integration support options ensures you can maximize the utility of MScore™.
Running MScore™ using Python
To demonstrate MScore™'s practical application, we'll walk you through a Python workflow that includes: 1) running a CMS risk model, 2) reading the output, and 3) visualizing the results. For these code snippets, you'll need to first download and install MScore™ along with the following Python dependencies:
Please ensure you complete this installation step before proceeding to execute the model.
To get the most of this guide, we recommend downloading our synthesized Person and Diagnosis data files to follow along with the same datasets we'll be using. Obtain a license key here.
Step 1: Executing a Model Run with MScore™
Below, we present Python code for loading the input files needed to run MScore™. Start by setting the path to these files, and then proceed to execute the MScore™ application. In this example, we use Python's subprocess module to execute MScore™, replicating the process of running it through the Terminal/Command Line.
Step 2: Reading the MScore™ Output CSV
Next, view the MScore™ outputs using pandas to read in the csv files as a dataframe. Once again, establish the paths to the output files on your local machine and then use the pandas read csv function to read the files.
Step 3: Visualizing Average Risk Scores with Plotly
Finally, for visualizing the results, we use Plotly Express to create a bar chart, allowing us to examine specific descriptive statistics from our dataset. In this case, we focus on the average score by model segment. While MScore™ uses abbreviations for these segments, our chart includes annotations with their full names for easy reference (see the list below):
- INS: Institutional
- CFA: Community Full Benefit dual aged
- CFD: Community Full Benefit dual disabled
- CPA: Community Partial Benefit dual aged
- CPD: Community Partial Benefit dual disabled
- CNA: Community Non-dual aged
- CND: Community Non-dual disabled
- NE: New enrollee
- SNPNE: C-SNP New enrollee
![mscore-plotly-barchart](https://ram-site-assets-pub.s3.amazonaws.com/article-images/newplot.png)
This straightforward three-step Python process enables you to run the MScore™ CMS-HCC model efficiently, handle the output adeptly, and use visualization tools for insightful analysis. MScore™, known for its Python compatibility, offers significant benefits to data-driven healthcare organizations by streamlining data operations with a modern approach.
As the volume and complexity of healthcare data continue to escalate, tools like MScore™ become indispensable in simplifying essential operations and reducing costs. With the combination of MScore™ and Python, your organization is well-equipped to adeptly manage CMS-HCC risk adjustments, ensuring precise CMS payments for the care provided to Medicare enrollees.
Get Started For Free
Disclaimer: The code examples above are for illustrative purposes and may require proper environment setup, license keys, or additional parameters to work effectively in your specific context. Always refer to MScore™ documentation or reach out to support@riskadjustmentmodel.com if you have questions.