Running CMS-HCC Risk Adjustment models with SAS Analytics Pro on Viya


In this blog post, we will demonstrate the steps to set up a program to run the CMS-HCC Risk Adjustment Models using a deployment of SAS Analytics Pro on Viya. If you are unfamiliar with SAS Analytics Pro on Viya, read part 1 of this blog series for an introduction.

The CMS-HCC Risk Adjustment models are used to reimburse Medicare Advantage plans based on the health status of the plans’ members. CMS-HCC Risk Adjustment is the practice of assigning a risk score based on demographics and diagnoses to an individual beneficiary of Medicare for the purpose of calculating an expected cost of care, relative to the average beneficiary. Accurate risk adjustment requires an accurate diagnostic profile of an individual on an annual basis, documenting diagnoses via submitted claims or within a provider's medical record.

Here is a simplified visual representation of the Risk Adjustment process.

  1. Collect patients' diagnoses and demographics into data tables
  2. Process those data tables with Risk Adjustment models provided by Centers for Medicare & Medicaid Services (CMS)
  3. Export the adjusted risk score for each patient to a data table

Let’s set up a program in SAS that follows the steps introduced above to run the CMS-HCC Risk Adjustment Models.

CMS publishes all the relevant documentation and methodology online on The models are published as SAS programs with setup instructions.

In the video linked below, we will follow the steps outlined by CMS. The steps include downloading the necessary files, setting up the folder structure, and editing the provided code to run properly. Take note that we’ll use SAS Studio (the same installation we used on part 1), the web-based SAS programming interface included with SAS Analytics Pro on Viya, to edit and run the model to score a sample of beneficiaries.

In the next part of this blog series, we will demonstrate how to set up an API layer to connect to the Analytics Pro on Viya container to execute CMS-HCC Risk Adjustment Models on an Azure server deployment.

*If you wanted to run the same CMS-HCC Risk Adjustment Models on 9.4 deployment, feel free to watch this video where Molly Jones explains the process.

**If you are interested in a license for SAS Analytics Pro on Viya, contact your SAS representative or get in contact with SAS through the chatbot on


About Author

Lucas de Paula

Customer Advisor

Working as Customer Advisor at SAS, Lucas loves to connect technology to different industries. He is always learning new things, but remains focused on the data science field.


  1. I downloaded the CMS model for 2024, for sas 7.1 , my transport files are not being read and getting an error of bad file and incorrect format for the other one. How do i fix that?

  2. Wesley Stevenson on

    Thank You for the step-by-step instructions on running CMS Risk Adjustment Models with SAS. Our organization is using SAS with the CMS Risk Adjustment Models.

    Do you know if there is something similar for the CMS Health Plan Star Ratings (5-Star) system?

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top