Pharmacy Order Fulfillment Service
A central fill pharmacy backend with priority scheduling, safe concurrent stock updates, and a full audit trail.
- Built a central fill pharmacy backend with a heap based priority scheduler and an order state machine whose every transition is written to an audit log in the same database transaction.
- Prevented overselling with atomic conditional stock updates and database constraints; a test firing 20 simultaneous requests at stock for 7 orders yields exactly 7 fills and zero negative stock.
- Load tested at about 330 orders per second (p95 under 108 ms); in a simulated 8 hour day, emergency orders waited about 18 times less than routine ones; 102 tests at 98% coverage run in GitHub Actions.