Open tools to keep patients out of the hospital.
Research and open-source software that help primary-care practices act on hospital alerts: predicting who is likely to be readmitted, and turning each alert into timely follow-up care.
Research by Thiago Batista Nunes Bandeira.
01Hospital readmission
Future-Information Leakage in 30-Day Readmission Prediction: An Empirical Audit and a Calibrated Electronic Health Record Model in Medicare-Insured Adults
Thiago Batista Nunes Bandeira, MS; Armando Gonzalez, MS; Christian Poellabauer, PhD; Ananda Mohan Mondal, PhD
Florida International University
medRxiv, November 15, 2026
A model that estimates each Medicare patient's risk of a hospital return within 30 days of discharge, and an audit that shows how a hidden data leak can make such models look better than they are.
236,906
Medicare-insured admissions analyzed
0.706
AUROC once a feature that leaked future admissions was removed (0.774 with it)
+0.10
AUROC above an adapted LACE score on the same patients (0.706 vs 0.605); the paper calls the gain modest
Began as an FIU master's capstone. Built on de-identified MIMIC-IV hospital records from one health system, validated internally; it needs external validation before clinical use.
02Avoidable ED visits
Using the NYU ED Algorithm and Admission-Hour Patterns to Reduce Avoidable ED Visits: A Primary-Care Perspective
Thiago Bandeira
SSRN, July 9, 2025
An analysis of Medicare Advantage claims that estimates which emergency visits primary care could have prevented, and at what hours ED visits happen.
15,253
ED claims analyzed
Source: SSRN, 2025, Avoidable ED visits
40.2%
potentially avoidable, by the NYU ED Algorithm with physician review
Source: SSRN, 2025, Avoidable ED visits
1,092
abstract views and 122 downloads (as of May 28, 2026)
Retrospective, one practice, one year of claims.
03From alerts to follow-up
From Payer Notifications to Primary-Care Follow-up: Retrospective Evaluation of a Notification-Derived LACE Score and a Transitions-of-Care Program
Thiago Batista Nunes Bandeira
Zenodo, November 2026
A published readmission score, adapted to run on health-plan alerts alone, and the follow-up program that uses it.
0.731
AUROC from health-plan alerts alone; machine learning did not beat it
44.4%
readmitted in the high-risk group, vs 14.9% in the rest
21%
fewer ED visits than expected after a separate July 2025 ED initiative (exploratory)
Retrospective, one practice. The risk thresholds were set after earlier results were reviewed, so the tier rates do not validate them. The paper does not claim the program lowered readmissions, and its ED comparison is exploratory.
Read the paper: From alerts to follow-up View the code: From alerts to follow-up
04Local AI agent
From discharge alerts to follow-up work: design and retrospective evaluation of a local, human-in-the-loop AI agent for primary care
Thiago Batista Nunes Bandeira
Zenodo, November 2026
An AI agent that runs on a practice's own hardware: rules score risk and set follow-up dates, and a local model drafts call scripts for a person to review.
64,036
hospital stays used to test the risk tiers (MIMIC-IV)
Source: Zenodo, 2026, Local AI agent
28.3%
readmitted in the high-risk tier, vs 14.3% in the rest
Source: Zenodo, 2026, Local AI agent
16.8 s
average time to draft each discharge, on one consumer GPU
Source: Zenodo, 2026, Local AI agent
Evaluated retrospectively on de-identified data. Human review and the clinical accuracy of the drafts are not yet evaluated, and the agent has not been used in patient care.
Read the paper: Local AI agent View the code: Local AI agent
Tools
Open-source code behind the papers, with synthetic test data only. Neither repository holds patient data.
care-transitions-agent
Local, privacy-preserving AI for the 30 days after a hospital discharge.
payer-notification-lace
Analysis code for the readmission score computed from health-plan alerts, with synthetic test data.
See the agent work
Watch the agent handle a hospital discharge, step by step. The alert, the risk score and the follow-up plan run live in your browser on the patient you pick. The AI draft, the check and the review replay the agent’s real recorded run for that same patient.
Choose a sample patient
Made-up patients. Pick one and the agent runs on it.
Step 1 of 6
A discharge alert arrives
Health-plan alert · Discharge
Sample patient, made up- Reason for the stay
- Heart failure
- Discharged
- Thu, Mar 12 · 8 days
- Going to
- Home
- Age
- 78 · on Medicare
- Came in through the ER
- Yes
- ER visits, past 6 months
- 2
Conditions on record
Heart failureKidney disease
Medication changes in hospital
- Dose changedfurosemide40 mg once a day increased to 40 mg twice a day
- Stoppedlisinoprilstopped because kidney function worsened
- Newhydralazine hydrochloride25 mg three times a day
- Continuedmetoprolol succinate
- Continuedatorvastatin
These change the score and the plan (steps 2 and 3). The medications and the recorded draft stay as they are.
Research code, not used in patient care. Every patient here is made up. View the code
How this demo works
Steps 1 to 3 run the agent’s own rules in your browser, checked against its Python code. The tiers use provisional thresholds (LACE 10, or 7 with Medicare under 65) that a practice would calibrate on its own outcomes, and the TCM code is a scheduling reminder, not a billing decision. Steps 4 to 6 replay the agent’s real run on each sample patient: its own workflow and local model (qwen3:14b, one consumer GPU), recorded on November 11, 2026, with a made-up practice name (“Sample Family Practice”). The problems marked in step 6 are our notes on those recorded drafts.
05About

Thiago Batista Nunes Bandeira
General Manager and Head of AI, Mendez Medical Center · Lauderhill, Florida
Thiago Batista Nunes Bandeira is General Manager and Head of AI at Mendez Medical Center in Lauderhill, Florida, where he leads the practice's data and AI work.
- Education
- MS in Data Science and Artificial Intelligence, Florida International University (2026)
- Certifications
- AWS Certified Generative AI Developer – Professional; AWS Certified Machine Learning Engineer – Associate
Contact
thiagobandeira.ai@gmail.com