How the University of Texas Medical Branch improved diagnostic testing for thousands of patients using AI

Keanan Koppenhaver
Keanan Koppenhaver
Technical PMM @ Retool

Sep 25, 2024

The University of Texas Medical Branch (UTMB) serves a broad and diverse patient population. Originally founded with a mission to serve underprivileged patient communities, UTMB serves incarcerated, unhoused, and uninsured patients and aims to bring the best standard of care to patients regardless of their situation.

To give more patients the best care and treatment, UTMB embraces tech industry strategies like prototyping and iterative development. With the advent of AI, UTMB wanted to explore ways of bringing more innovative solutions to the rest of the hospital.

Dr. Peter McCaffrey is both the director of Pathology Informatics at the UTMB’s John Sealy Diagnostic Center and chief AI officer for UTMB at large. His work bridges the worlds of medicine and tech: he’s a pathologist with a data science background. From this position, Dr. McCaffrey saw many opportunities to improve patient outcomes by integrating AI into the diagnosis and treatment process. Here’s how he—along with his lead engineers Gladson John and James Weatherhead—built AutoTox, an AI-powered Retool app that improved diagnostics and helped UTMB serve ten times more patients.

Problem: Slow test results that delay patient care

Precise diagnostic testing is crucial to ensuring patients get the best possible care—but achieving that high level of precision can be manual and slow.

Toxicology sign-out is a particularly manual part of testing. In this step, a pathologist reviews test results that will affect a treatment decision—for example, whether to prescribe one medication or another or whether a patient appears to be taking their medications as prescribed. For a single case, the doctor might need to spend 15 minutes reviewing more than 40 metrics alongside the patient’s demographic data and current medications. At that rate, Dr. McCaffrey’s team of four pathologists could review only about 50 cases per week, however, they wanted to pursue the new demand for diagnostics services.

Dr. McCaffrey saw an opportunity to scale up diagnostic efficiency by automating this final step, enabling his team to treat more patients.

First, he explored modifying UTMB’s existing medical records system. However the complexities of the records system and the administration overhead made that approach prohibitively complicated, and it would require additional development resources to complete. A records system overhaul also lacked the scalability Dr. McCaffrey needed. Making future changes and improvements would be slow.

He also considered staffing UTMB’s developers to build a brand new system for toxicology processes, but building a custom solution in-house would take at least six months, and would require a bigger budget for his team.

Luckily, Dr. McCaffrey found a solution in Retool.

Solution: An AI application that securely analyzes and summarizes test results

Dr. McCaffrey, who was familiar with Retool from his time running a biotech company prior to UTMB, already knew how quickly he could ramp up a secure, reliable application. Plus, with Retool’s self-hosting capabilities, UTMB would be able to stay compliant with both its internal security protocols and HIPAA regulations. So, Dr. McCaffrey built a custom app—AutoTox—to automate toxicology interpretation.

How AutoTox works

When the lab generates toxicology test results measuring the drugs and drug metabolites present in a patient’s urine sample, a Python script runs an SQL query to pull those results out of UTMB’s medical record system and into a Postgres database. AutoTox then sends the results to one of OpenAI’s GPT models via a private, HIPAA-compliant Azure backend, and it prompts the model to simplify the results into a report. GPT generates the report in a few seconds, and AutoTox receives the finalized report draft.

AutoTox presents a case list along with case metadata, test results, and interpretive text for pathologists to review and verify findings (as well as provide feedback on the quality of model outputs). Pathologists can then send these results to the medical record system.

Behind the scenes, Dr. McCaffrey found it surprisingly easy to build AutoTox. It took him five weeks to finish the app, a timeline that he says is “unheard of.” Retool’s flexible app development platform also made it easy to iterate, helping Dr. McCaffrey think through how the application should work as he built it and as more pathologists started using it. Between the flexibility and ease of building with components and built-in AI integrations, Retool was the perfect platform for building a modern toxicology application with scalable patient outcomes.

Watch a live demo of UTMB's AI-powered apps on YouTube.

Impact: UTMB can provide more patients with better care

AutoTox reduced toxicology sign-out times (all the manual review that affects a treatment decision) by 66%, from 15 minutes to 5. As a result, the pathology team increased its care review throughput by a factor of 10, reviewing 500 cases per week instead of 50. Test accuracy has also improved: AutoTox can also catch errors that might be easy to miss if a human is combing through 40 toxicology levels by hand. By creating these efficiencies—and supporting more accurate results—UTMB helps more patients get better care, in less time.

Because Dr. McCaffrey could do so much of the development himself, he removed the bottleneck of getting IT resourcing or working inside the traditionally long engineering cycles. He built an app himself that expanded the patient caseload by a factor of ten—largely exceeding the expectations of other leaders at the hospital.

Building AutoTox proved that UTMB could build and implement other AI-powered applications to enhance patient care. Not only could UTMB build effective and compliant AI apps quickly, but the end users were impressed as well. Peter says, “It looks professional, it's easy to use, it's interactive, it doesn't go down. It’s a lot better than a homegrown app.”

Next up: Bringing AI to hospital operations

Now that UTMB has a proven use case for using AI-powered apps to improve and expand patient care, Dr, McCaffrey plans to build more solutions to automate several other internal processes. For example, he’s building an application to manage genomic testing for UTMB patients, as well as a ticket-tracking system for research labs. Using Retool’s simplified AI stack, with its built-in vector database and RAG capabilities, Dr. McCaffrey can avoid managing and integrating multiple AI vendors while still giving the AI model secure access to important information like a patient’s case history and chart notes.

With Retool AI, it’s never been easier to not only jump in and, in Dr. McCaffrey’s words, “pick a project and start prototyping,” but also to ship an app to production that can completely transform what your organization is able to do with its tools.

Ready to speed up your internal processes with AI applications? Sign up for Retool or schedule a demo.

Reader

Keanan Koppenhaver
Keanan Koppenhaver
Technical PMM @ Retool
Keanan educates the community about how they can use low- and no- code tools to transform their day-to-day work, even if they wouldn't consider themselves a "developer". He writes about AI and LLMs.
Sep 25, 2024
Copied