Using No-Code AI to Predict Hospital Readmission

Use Cases

This article will teach you how to build a no-code AI model to predict hospital readmission.

Using machine learning to predict hospital readmission. And when use effectively, it can lead to more efficient use of scarce hospital resources while improving the overall quality of care that patients receive. Further, research demonstrates that high rates of readmission lead to decreased profitability.

In short, predicting and reducing readmissions is a win-win for everyone involved.

In this guide, we’ll use no-code tools to leverage machine learning to predict the probability of a hospital readmission, and deploy our model on new data via Zapier, a no-code automation tool. Be sure to check out our other healthcare use-cases!

1. Building a hospital readmission prediction model

First off, let’s sign up for a Pro account on Obviously.AI , which comes with a 14-day free trial (and no credit card is needed to sign up).

After log-in, you’ll see a dashboard with an “Add Dataset” icon on the left. For this example, upload a simple tabular dataset from Kaggle, which features 25,000 rows of patient data, with 65 columns, including a column on whether the patient was re-admitted.

Our goal is to predict a KPI called readmitted, which is the value 0 for patients who were not readmitted, and the value 1 for patients who were readmitted.

After clicking to upload a CSV file, you’ll need to verify the dataset, and simply check off that the first row is the column names and that all requirements are met.

Now, we select the column we want to predict, which is called “readmitted.” In the background, a series of machine learning models compete to create the most accurate predictions for readmitted.

And we’re done! Now, we can also see how various attributes impact the hospital readmission KPI. The main drivers discovered by the automated machine learning models were number_inpatient and number_emergency.

Let’s move on to building a Zapier sequence, so you can deploy predictions in the real world, and predict hospital readmission on new data.

2. Building a Zapier Flow

Now, make a free Zapier account, if you don't already have one. We’ll first connect Zapier to a dataset in Google Sheets. We’ll then select “New Spreadsheet Row in Google Sheets” as the trigger to activate a Zapier sequence.

After choosing that trigger, I selected my demo Google Sheet, which I titled “New Data.”

This sheet should have the exact same column names and data types as the file I used to make the predictive model (minus the actual target column of “readmitted”).

For instance, since my training data had columns like time_in_hospital and num_lab_procedure, and so on, I use those exact columns in this Google Sheet.

Next, we’ll select “Webhook,” and then “Custom Request.” This is how we’ll integrate with Obviously AI.

To set up the Custom Request, add in these details:

The data field is the most important, which requires matching up the column names in your data with the column names used in your model. Check the documentation if you’re unsure!

To set it all up, you’ll also need your Report ID and API key. Your API key can be found in your account, which gets added as a “Header” in Zapier. To get the Report ID, head to the “Export Predictions” tab in Obviously AI, and click on the shareable report link.

The Report ID is the ID you see in that URL. In the example above, it’s the string “cff9...1fd7.” As you can see in the documentation, this gets added in the bottom of the “Data” field in Zapier.

Now, we can test our Zap, which sends data from our new data sheet to our hospital readmission prediction model, and we’ll get the hospital readmission probability as an output. With these predictions in Zapier, we can now do anything we want with them: Send them to a Slack channel, send an email to our team, add the prediction to our sheet, or anything else.

For now, let’s just update our sheet with the estimated hospital readmission. This can be done with the action titled “Update Spreadsheet Row in Google Sheets.”

Then, simply add the probability created in the aforementioned webhook.

Now, let’s take it a step further. We can create a “filter” in Zapier to send an email notification when the predicted hospital readmission is above a threshold that we set. I set up a filter that gets activated when the hospital readmission probability is higher than 70%.

If the hospital readmission probability is higher than 70%, we can automatically send a notification email so that we’re aware of the situation.

Summary

Zapier is a powerful way to automate practically anything in your workflow. With Obviously AI, you can integrate the power of machine learning to create AI-driven workflows, including to predict hospital readmission and lead to more efficient use of scarce hospital resources while improving the overall quality of care that patients receive.

(Hospital Photo by Piron Guillaume on Unsplash)

obviously.ai logo

Become the Data Scientist your team always needed.

Get Started

Get Started Now

See how no code machine learning can transform your business and change how you make decisions.