Hospital Benchmarking Report Engine
Express Report Service & Server-Driven React Report UI
Role: Built the Express report-engine service — tokens, report and dashboard endpoints, benchmarking logic — and the React + TypeScript report UI that renders its layouts.
What it is. A benchmarking and KPI analytics platform for Ontario hospitals: hospitals submit their trial balances and compare financial and staffing indicators against peer groups, in a report hub and interactive dashboards.
Report engine. An Express service next to the main platform API. The platform exchanges a server-held key plus the user's entitlements (reports, years, peer groups) for an access token, so the engine enforces subscriptions without reading the portal database. Its report and dashboard endpoints carry the benchmarking business logic: each hospital's indicators against its peer group's median and quartiles, with multi-year trends.
Server-driven UI. Responses are arrays of typed UI blocks — layout, inputs, tables and charts — so new reports ship without a frontend release. Drill-downs post the clicked quartile and year back, and the engine returns only the block to replace.
Report UI. A React + TypeScript renderer walks those blocks recursively, with MobX stores per domain, ag-Grid tables and Chart.js charts.
Key Features
- Express report engine with an entitlement-scoped token exchange with the main platform
- Report and dashboard endpoints with drill-downs that return only the block to replace
- Benchmarking logic: indicators vs the peer group's median and quartiles, with multi-year trends
- Server-driven layouts: typed UI blocks (cards, tabs, dropdowns, tables, charts) — new reports without a frontend release
- React + TypeScript recursive renderer with MobX stores per domain
- ag-Grid tables and Chart.js charts for the report hub and dashboards
Tech Stack
Backend
Frontend
Tools
Challenges & Solutions
Reports Without Frontend Releases
Analysts wanted to add and change benchmarking reports often. Hardcoding each report layout in React meant a frontend release for every change.
The report engine returns a JSON array of typed blocks — layout, inputs, tables and charts — and the React UI walks it recursively. Each block can declare the endpoint it loads from or posts to, so a new report is a server change only.
Enforcing Subscriptions in a Separate Service
Which reports, years and peer groups a hospital may see is decided by its subscription in the main platform, but the reports are served by a separate service.
A token exchange: the main platform sends the user's entitlements with a server-held key and receives an access token that carries them. The engine enforces access from the token alone, without reading the portal database.
Drill-Downs Without Reloading the Page
Clicking a bar in a distribution chart had to open the detail for that quartile and year without re-rendering the whole report.
Each chart declares how a click maps to request fields (for example dataset → quartile, x-axis → year). The UI posts them back, the engine returns a replacement block with the same id, and the store patches that subtree in place.