Skip to content
TH Intelligence, home

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.

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.

Read the paper: Hospital readmission

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.

Retrospective, one practice, one year of claims.

Read the paper: Avoidable ED visits

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.

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.

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.

More on GitHub

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

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

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

GitHub LinkedIn ORCID