- My role
- Sole developer: design, database, backend, frontend and testing
- Built with
- Python, FastAPI, SQLAlchemy, PostgreSQL, React, Vite
- Size
- 30+ screens, 86 database tables, 14 staff roles
- Status
- Built and tested, 45 automated tests passing
Why it was needed
In many private hospitals, reception writes the patient's name in one register, the lab writes it in another and the pharmacy types it again. Bills get added up by hand at discharge, and the owner has no quick way to see how much money came in, how much is still owed, or where it leaks.
This hospital already used MediStore for its pharmacy. My job was to build everything around it, so that every department works from the same patient record.
The engineering I'm proud of
Hospital software has to be right when it's busy, so I put most of my effort into the parts nobody sees.
- No double dispensingI tested four pharmacists clicking "dispense" on the same prescription at once: exactly one succeeds and stock drops once.
- Safe numberingInvoice, token and prescription numbers come from one atomic PostgreSQL statement, so they never repeat.
- Privacy by roleFourteen staff roles each see only their screens. Patient QR codes are signed and can be revoked, and every sensitive action is audit-logged.
- MediStore kept intactThe pharmacy code is copied byte for byte, and a test fails if anyone edits it, so both products stay in step.
- Tested on real PostgreSQL45 pytest tests cover the full outpatient and inpatient journeys, ER, panels, OT, payroll and compliance.
- Clicked through as real staffPlaywright logged in as ten different roles and opened every screen with no errors. Migrations upgrade and roll back cleanly.
What I learned
The first version covered the clinical workflow. Then the hospital owner sat with it and listed what a real day needs: emergencies that can't wait for payment, insurance panels with credit limits, cash that has to balance at the end of each shift. I built those in four more stages, each one tested before the next began.
That review taught me more than any spec could. Software for a hospital isn't just screens. It has to match how the staff actually move through their day.