Skip to content
Yue Wong
← All work

Built for a nurse

A therapeutic infusion regimen lookup for nurses

A fast search tool, built for a friend who's a nurse, that replaces scrolling a spreadsheet to find how a drug is given, and that someone without a terminal can keep up to date.

Problem

The unit’s therapeutic infusion regimen list lived in a spreadsheet: one row per drug, with appointment and infusion length, rate, diluent, premeds, required labs, consent, and administration notes. Finding one drug meant scrolling and squinting.

What I built

  • A search page over all 71 regimens. Type a brand name, a generic name, or a diagnosis, and every field for that drug appears. Keyboard shortcuts (/ to search, arrow keys to move) and deep links to a single drug.
  • An import script in Python that converts the original Numbers/Excel spreadsheet to CSV, with tests that check the output against the source file so nothing is lost in translation.
  • An admin page so the list can be updated without me. Download the current data, edit it in Excel or Google Sheets, drop the CSV back in, and review a field-by-field diff before it goes live.

Key decisions & trade-offs

Literal matches first, fuzzy only as a fallback

Pure fuzzy search can rank a loose match above an exact one. Here, an exact match on a drug name matters more than anything else, so ranking goes: name starts with the query, then name contains it, then diagnosis contains it. Only when nothing matches literally does it fall back to fuzzy matching, so a typo like “remicaid” still finds infliximab (Remicade). A small alias file adds names the spreadsheet doesn’t have (Feraheme → ferumoxytol).

Search in the browser

With 71 records there’s no reason for a search server. The whole list loads once and search runs on the device, so results appear as you type. If the live data can’t be reached, the page falls back to a bundled copy and says clearly that it may be out of date.

Safe updates by a non-developer

The person updating the list shouldn’t need me, and shouldn’t be able to break it. Uploads are validated (a missing drug name or duplicate ID blocks the save; a dropped column is flagged), a library of up to ten saved CSVs means an earlier version can be switched back in, and if two people edit at once the second save is refused instead of silently overwriting the first.

Tests that gate deploys

Unit tests cover search, CSV handling and login; end-to-end tests run against a fresh local database; and Playwright runs the UI in desktop Chrome and iPhone-sized WebKit. The publish script only deploys if every test passes, and a smoke test checks the live site afterwards.

Result

Live at ti-regimens.pages.dev. Finding a regimen went from scrolling a spreadsheet to typing a few letters, typos included, with every field for that drug on one screen. Because the list is maintained from the admin page, keeping it current doesn’t depend on me.