Automating Enterprise Healthcare Vendor License Checks Across 40,000 Records
An app that checks vendor licenses on licensing agency websites.
TL;DR: I helped build an app that checks vendor licenses on licensing agency websites, and it automated checks across about 40,000 records that would have taken people weeks by hand. I worked on the frontend, the API and the checking engine, and I came up with a Chrome extension that fills in license numbers so a person can solve the CAPTCHA. The app is live, and the client is actively using it.
My role
I was part of a team and worked on the frontend, the API and the website-checking engine. I also made the browser extension.
Architecture
We built the web app with a React and TypeScript frontend and a FastAPI backend, and limited what each user could do by role. We stored each run, its results and its pending checks in SQL Server.
We built the engine as a separate service that picked up pending runs from the database. To check a website, we used direct web requests, or Playwright when we needed a real browser. We ran everything in containers on OpenShift and scaled the engine with the workload.
Challenges
Different websites
Each licensing website worked differently, and we didn't want to maintain separate code for every one. For many sites, we wrote a configuration file for a reusable checker, and for the more complex ones we wrote custom code. If a configuration was invalid, we skipped it and recorded its errors.
Long runs
We ran the engine apart from the web app and split each run by agency. Each worker claimed a piece of the run with a single database update, so two workers never took the same piece. Busy workers also sent heartbeats, so we could recover the work if one stopped partway through.
Speed and capacity
We checked agencies in parallel and limited simultaneous requests to each one. We capped autoscaling so the workers wouldn't exceed what the database could handle.
Reliable results
People could change the source records during a run, so we worked from a snapshot. If we couldn't save a batch of results, we retried them one at a time, so one bad result didn't cost us the whole batch. We sent cases that needed a person to an issue queue.
CAPTCHAs
We couldn't fully automate some sites because of CAPTCHAs. I came up with the idea of a Chrome extension: it filled in license numbers, and a person solved the CAPTCHA and ran the search. We also had the engine recheck sites we had flagged for CAPTCHAs, to see whether the CAPTCHA was still there.
Result
The app is live, and the client is actively using it. With it, we automated checks across about 40,000 records, work that people would need weeks to do by hand.