When Affiliated Colon and Rectal Surgeons came to us with a problem, it sounded like a manual labor sentence: close 13,000 patient notes, by hand, six to twelve clicks each, no batch option, no API, no shortcut.
They'd already spent a full week on it. At that pace, they were looking at several more.
Here's why they were stuck. When the practice transitioned from paper to electronic records about twelve years ago, the staff spent weeks testing the new system. They created test patients, test notes, test everything. Nobody told them to lock those notes when testing was done, so they didn't. On top of that, they'd been using the notes field for internal purposes over the years: no-shows, referrals, administrative flags. None of it locked.
The EMR vendor had no batch close function. Their support relationship was rocky enough that they didn't trust anything support told them. And before they could export their records to a data custodian as part of closing the practice, every note had to be individually locked. Open the patient, navigate to the note, lock it, confirm. Repeat 13,000 times.
I told them to stop.
The next day I looked at what was actually possible. Reverse-engineering the API wasn't an option; I tried and failed, which is the right outcome from a security standpoint. But the UI worked fine. It was just slow and repetitive, and repetitive UI work is exactly what Playwright is for.
Playwright is a browser automation tool, originally built for frontend testing. You give it a script and it drives a real browser: clicking buttons, filling fields, navigating pages, all without a human at the keyboard. They exported a CSV of all the patient IDs, I wrote a script to iterate through the list, and we let it run.
Each patient took six to fifteen seconds as the browser navigated through the UI. With two authorized logins running in parallel, total runtime came out to about fifteen hours across two overnight runs.
The alternative was weeks of someone sitting at a keyboard doing the most tedious work imaginable, errors and wrist strain included.
One thing worth being direct about: I used an LLM to help me write and tune the script. That's what made this a one-day build instead of a week-long one. But once it was running, it was plain old code. No AI tokens burning at runtime, no API calls to some inference endpoint, no ongoing cost. A browser, a script, and a CSV.
The solution wasn't clever. Playwright has been around for years. What it required was recognizing that this was a UI automation problem rather than a manual labor problem, and knowing what tools exist to solve it.