Introducing the Readmission Risk Pool Platform

Healthcare Analytics
Software Development
Healthcare
Readmissions
An open-source platform for hospital readmission risk assessment.
Author

Alex Zajichek

Published

November 18, 2026

The old package

I built the original 0.0.1 version of the readmit R package back in December 2025 (see the article here). Maybe some of that was useful, but it felt like a hodgepodge of functionality. One of the main limitations was that it was built to directly ingest the Hospital-Specific Reports (HSR) that hospitals receive detailing their results from the Hospital Readmissions Reduction Program (HRRP) for that year. These are Excel workbooks that contain details about the total penalty amount, the contributions of each disease cohort to that penalty, and the line-item, discharge-level data of the patients that contributed to the penalty for each disease cohort, among other things. This had been the standard format for how these reports were produced for many program years. So, the package functions depended explicitly on this format to properly import the various tabs from this workbook, all the way down to field names, row gaps, etc. It seemed to be reliable and worked well for a collection of sample reports spanning multiple program years.

Basically right as I had finished up developing the code, CMS completely changed the way these reports were formatted, how they were structured, and how hospitals would access them. Starting in FY2026, the information in these reports was to be retrieved in various CSV files that hospitals could only download from within the Hospital Quality Reporting (HQR) portal (which you need a login to access). The sample report page, which the initial package version depended on for developing the right structure, no longer contained examples of the actual data files. I was blind. So even though the package was still useful for analyzing historical program results, the functions were obsolete to analyze future reports, and now I had this baggage of carrying around multiple reporting standards and trying to determine if I should try to accomodate both, or just forget about the old versions and try to work towards implementing for the future.

So this year, I scratched all of it.

Don’t get me wrong. The concepts in the original package are still important, and I think there is definite value in having a strategy and method to analyze these reports to understand your hospital’s results in the HRRP. But I wanted to give the package a more coherent identity and a more direct purpose.

Starting with the 1.0.0 version, the readmit R package is now the Readmission Risk Pool Platform (RRP). The current CRAN version is 1.1.0, so you should make sure you have that one when you install it:

install.packages("readmit")
packageVersion("readmit")
# [1] ‘1.1.0’

What is the RRP?

This is something I’ve been sort of casually exploring and thinking about for years. I’ve spent most of my career working for hospitals as a data scientist, and I got to see readmissions from many different angles: on the research side focused on the methodology trying to build models to predict readmissions in different contexts, on the administration side trying to untangle the HRRP and convey to hospital leadership how the results relate to broader executive level reporting metrics, and on the day-to-day side working directly with the nurses and care teams trying to figure out which patients to call to prevent a readmission from occurring.

Through all of that there was a lot of problems, or opportunities I should say, to do things better from a data science perspective. There are many layers to this. From the disconnect of readmission reporting metrics between teams and layers of the health system (e.g., HRRP vs. hospital readmission metrics, finance vs. quality, etc.), how readmission risk models get implemented and used in the clinical workflows, and even just the framing of the readmission risk estimation problem. In 2024 I sort of consolidated all of my observations about readmissions into a cohesive framing of the problem and my view of a solution which I wrote it all up in an article here.

The Readmission Risk Pool Platform (RRP), for now, focuses on the risk model framing part.

It essentially provides the analytic workflow to facilitate hospitals being able to track, estimate, and monitoring readmission risk throughout the 30-day post-discharge period. The premise being that, while potentially useful at that specific time, discharge risk scores (which are the most common/prominent way readmission risk models work) quickly grow stale after the patient leaves the hospital. We should be monitoring and updating risk (e.g., daily) to continually monitor who currently needs the attention. That could be someone who was just discharged yesterday, or someone who was discharged 20 days ago (both are at risk for readmission still, and thus are part of the “pool”).

Future versions my incrementally add more scope to the readmission management problem: like thinking about interventions, tracking those, or lineage between HRRP and hospital readmission metrics to the day to day management of readmissions. It’s all on the table.

How does it work?

The website has much more detailed information, tutorials, and documentation, so you should browse that site for the technical specifics and how the package functions actually work, but I’ll describe it here more off the cuff.

The basic idea is that you initialize an RRP Project (using the rrp_project_init() function). This generates a new project folder which all of your work will be configured in. As you configure things or want to operate/run the platform, you simply just use the other package functions to apply operations to your project. So you are just managing that project folder that gets created.

What’s in an RRP project?

You can go and see it here. That folder is the exact project template that is made to your computer.

  • You get a README.md file which tells you exactly what you need to do next and how to operate your project.
  • You get some configuration (.dcf) files that simply provide metadata about your project.
  • You get a runnable Shiny application in app/ that is completely self-contained (you can customize it or deploy it anywhere) (You also get some branding files to help with that config)
  • Most Importantly: You get two scripts in R/ that need to be configured. Once those are configured properly, then you can essentially just start making runs on the project.

What’s in the R scripts?

These are the essential pieces, and represent the core concepts of the platform. One script is for you to map your hospital’s data to the canonical data model the platform needs to perform operations.

For produce-canonical.R, you are essentially just determining what a “discharge” and “readmission” is for your hospital (with timestamps) and mapping that to the column names the platform expects. It simply needs to be encoded in the R script, but you can use whatever database connectors/tools you’d like to retrieve your data. Then when a run is made on the platform, it’s just going to run that script at the appropriate step to fetch the discharges it needed.

For calculate-risk.R, you are configuring how you want to estimate the risk of readmission for each discharge that gets passed through the function. This can be anything you want. You can have as simple or complex of a model you want. You can bring in any number of additional predictors you want. The main requirement is that you understand what is being predicted, and your model should be reflective of that estimand (which is the remaining risk of readmission at the current point in time).

The choice to keep things pieces up to the user is COMPLETELY INTENTIONAL. First, you know your data, how it’s captured, how things are defined. It’s your call to make what represents discharges for your organization. Second, I think readmission risk models (and models in general) are actually better suited to be locally developed. I don’t need to prescribe some risk model that I think is universally applicable to every hospital and patient. That’s the EXACT OPPOSITE of my philosophy. Instead, I think every hospital probably has a different flavor as to why patients are readmitted, how they want to think about risk, and what specific drivers of that risk are. Thus, these are meant to empower analysts within health systems to build their methodology.

You can use validation functions (e.g., rrp_project_validate()) to check things and confirm things along the way. The README.md and website tutorial also help you understand how to make things fit together.

Persistent history and app data?

So when the RRP Project is initialized, there’s actually one piece that’s not in your folder until you make it so. First, you’ll notice that if you try running the app/ right after project initialization, it will work, there’s just no data to feed it. You need to first configure your source mapping and model prediction functions. Once those are in place, you use the rrp_state_init() function which then adds another folder to your RRP Project in order to capture persistent history of your operational runs. Specifically, it initializes an (empty) DuckDB database that will eventually store records and predictions as runs are made, along with the datasets needed to populate the application.

So if we assume you’ve configured the source mapping, a valid model, and initialized the state history, you can then use rrp_run() to perform a “run” on your project. For example, a run might (or should) mean: “as of today, or right now, query all of the patients currently at risk for readmission, and compute their remaining risk of readmission”.

Your source mapping and model prediction scripts are invoked, and propogated through the platform functions. Ultimately, all (qualified) discharges will receive their readmission risk prediction (according to your model) and then write those records to the project’s database.

Now if I run it again tomorrow, it’s going to do it again. And again. And again. Everytime you run the platform, based on the as-of time you input (which typically would be right now) it should see who is at risk for readmission and then store their risk in the database.

This means you now have a trajectory throughout follow-up for each patient at risk for readmission.

You can query this database if you’d like to explore those results (or use the rrp_inspect_history() function).

Then, the next step of package functions is to actually get this data to now populate in the application.

Once you have your persistent, retained history in the database, you can use the rrp_refresh_products() function which will extract the relevant records from your current historical database and prepare them as CSV files that the application currently needs.

This is key: the app does NOT read from the database directly. We intentionally create the extracts of what the app currently needs for its purpose. Namely, the patients who are currently at risk for readmission, and their associated risk trajectories. The database stores everything, forever. The extracts get refreshed to facilitate the app for that point in time.

A self-contained app

THAT is the whole point. The refreshed application datasets make it so your applications is completely separated and independent of everything else, including the readmit package. Thus, you get to choose what to do with the application: you can add your own custom hospital logo (it comes with a placeholder), you can change the color schemes, you could even add a bunch more analytical content if you wanted to connect other sources. But importantly, you can deploy the app wherever you want without a bunch of overhead besides the basic, standard dependencies that are required for the Shiny application.

Empowering hospital analysts

One of the main goals of developing it this way was to empower data analysts, data scientists, quality folks, etc. to be able to build a usable data/modeling product that is operational almost out of the box without prescribing exactly how you do it. Again, you get to determine how the source mapping is done. You get to determine how the modeling is done (though I’m always open to discussing this :) ).

But more importantly, this is just an R package. It’s FREE and OPEN SOURCE. You can literally just install/download it and start using it. Typically with platform vendors and stuff like that, there’s so much bureacracy inside a hospital by the time a new tool can get “approved”, then tested, then evaluated. Probably because there’s money at stake. So by the time you’ve even been able to vet something it’s already been forever. You have to likely already have all the different stakeholder buy-in, etc. because there’s likely so much integration involved.

This tool takes a different approach.

Instead, it’s immediately available to you. Just install it. And once you install it, you already have a polished application out of the box. You just need to link up your data source and model and GO. Thus, you, on your own, as an analyst inside the hospital, could get it all configured with your ideas of how risk should be estimated, and simply start running the platform and getting predictions. The package tools let you easily operate your project, so now your Shiny app is going to be updated with the actual patient data and risk trajectories. You can add your hospital’s logo to the app, and rebrand it if you’d like, and even deploy it somewhere internally-accessible (e.g., Posit Connect, or some other app service).

By the time you even need to start talking to stakeholders about it, you can have a living, breathing polished product in place. You don’t need to go to people with the idea of it, you can go to them with the actual product. They can see it, and determine if it’s useful, or what would make it useful. They can put there hands on it right away. And YOU are the one that took the initiative and built it.

Why is it a “platform”?

I call it a platform because it’s meant to be an operational tool that a hospital data science team or analyst can use to actually facilitate readmission prediction day to day. There is a web application that you can deploy wherever you want to have care teams navigate who is at risk, etc. So I see it more as a platform/software installation that is simply delivered as an R package. And actually, I spent a TON of time developing this into an actual stand alone, installable software with its own command line interface (CLI). It was fully working with an rrp command you could run in terminal. That was going to be the primary interface to operate the platform. But I got to a point where it was becoming way overengineered for an initial version (even though it was pretty cool), and since most of the backend was written in R anyway, it DRAMATICALLY simplified things to declare the platform itself as an R package and implement it that way.

Future direction

While the current platform operations and the application are pretty polished and rigorous, the scope of information is not yet. Right now it’s quite simple: you just load your discharges, assess the risk, and the app displays the risk over follow. That’s useful information. But eventually I want it to be able to connect MORE dots around readmission management (again going back to some of the broader points made in my 2024 article).

For example, I could envision there being capabilities to test, record and assess local interventions on readmission reduction. Every hospital is trying all sorts of different things to try to achieve clinical outcomes. Why not let teams register and encode those strategies into the platform, see how they work, and potentially INFORM the risk estimation as they take shape? It’s sort of like a feedback loop: implement an intervention, train new models with those interventions encoded, and then risks adjust based on those interventions. You start to be able to assess counterfactuals of different interventions, and not just identify who is at highest risk, but what intervention might be best for them at that point in time during follow-up.

Another layer is executive-level readmission reporting. There’s so much disconnect in terms of what patients are included in which metrics that a lot of the times these become almost uninterpretable or meaningless. For example, the HRRP only cares about Medicare patients, but hospital-level readmission metrics typically look at everyone. You might still get penalized even though you are meeting your hospital level goals. This is a lineage problem. And I think hospitals can do a much better job of tracking that lineage across different readmission measures, how they relate to one another, and how things roll-up (or roll-down) into the day to day readmission management of individual patients.


We’ll end it there. Check out the website to get started with an RRP Project. It’s free and open-source, so you don’t have much to lose. Would love to hear any feedback from people actually trying to use it.