CMS Star RankingsA web-based tool for calculating and exploring CMS Hospital Star Ratings, replicating the official SAS methodology (July 2025). Data here: https://qualitynet.cms.gov/inpatient/public-reporting/overall-ratings/sasOverviewThis project converts the official CMS SAS code for Hospital Star Ratings into a modern Python implementation wrapped in a Flask web application. It allows users to: Browse and search for hospitals. View detailed quality measures for specific…
Source code on GitHub.
A web-based tool for calculating and exploring CMS Hospital Star Ratings, replicating the official SAS methodology (July 2025). Data here: https://qualitynet.cms.gov/inpatient/public-reporting/overall-ratings/sas
This project converts the official CMS SAS code for Hospital Star Ratings into a modern Python implementation wrapped in a Flask web application. It allows users to:
The calculation logic is a direct port of the Yale CORE SAS Package (July 2025), ensuring accuracy with official CMS methods.
pip (Python package installer)bash
cd "CMS Star Rankings"
`
- Set up a virtual environment (optional but recommended):
`bash
python -m venv .venv
source .venv/bin/activate # On Windows use: .venvScriptsactivate
`
- Install the required Python packages:
`bash
pip install -r star_ratings_app/requirements.txt
`Usage
- Navigate to the application directory:
`bash
cd star_ratings_app
`
- Run the application:
`bash
python calculations.py
`
- Open your web browser and go to:
http://localhost:5555Project Structure
star_ratings_app/: Contains the Flask application source code.
- calculations.py: Main application logic, including the Star Rating algorithm and Flask routes.
- index.html: Frontend user interface.
- script.js: Client-side logic for interactivity and API communication.
- style.css: Application styling.
- requirements.txt: Python dependencies.
alldata_2025jul.csv: Source data file containing hospital measures (located in the root directory).
Hospital_General_Information.csv`: Source data file containing hospital names and general info (located in the root directory).The application implements the following steps from the CMS methodology: