EasyFax
Encrypted order tracking and faxing system for a home health agency. Replaces a manual scan and fax loop with one upload.
- Stack
- Next.js, TypeScript, Prisma, Postgres, Cloudflare R2
- Role
- Engineer
- Status
- Running daily at the agency
Why I built it
Faxing was the worst part of the day. Print the patient cover. Print the document. Write the doctor info in by hand. Walk to the fax machine. Send. Wait for the confirmation. File the receipt. Log it in the binder. Then start over for the next patient. Staff ran that loop dozens of times a day, and any step could go wrong.
EasyFax replaces the whole loop with one upload. The app names the file, classifies it, builds the cover sheet, sends it through WestFax, and logs the confirmation. A morning of faxing now takes a few minutes.
Reading the document
The upload only saves time if the app can work out what it just received, so an uploaded bundle gets split into individual documents, each one classified by type and matched to a patient.
Born digital PDFs carry their own text layer. Scanned pages go through OCR, either Tesseract or Google Document AI depending on what the page needs. Both sources are normalized into the same coordinate space at a fixed resolution, so a token from a text layer and a token from OCR are interchangeable downstream and the extraction logic does not need to know which one it is looking at.
Layout was harder than recognition. Healthcare forms put a label in one column and its value in another, and plain reading order pairs them wrong, so fields are rebuilt from the token bounding boxes. The rest is normalization, like treating a curly apostrophe and a straight one as the same character when matching patient names.
How it stays safe
PHI lives in encrypted columns. The lookups use blind indexes, so we can still search by patient name without decrypting the row. Every send, edit, and login writes to an audit log. The encryption uses three separate keys, so a stolen database on its own does not reveal any patient data.