Back to Projects

Hospital Benchmarking Report Engine

Express Report Service & Server-Driven React Report UI

Overview

Role: Built the Express report-engine service — tokens, report and dashboard endpoints, benchmarking logic — and the React + TypeScript report UI that renders its layouts.

Express report-engine service for a hospital benchmarking platform: an entitlement-scoped token exchange with the main platform, report and dashboard endpoints with drill-downs, and the KPI business logic — each hospital's indicators against its peer group's median and quartiles, with multi-year trends. Responses are typed UI blocks, so new reports ship without a frontend release.

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

Node.jsExpressREST APIToken authAWS API Gateway

Tools

JSON UI schemasWebpackJenkinsAWS

Frontend

ReactTypeScriptMobXag-GridChart.jsreactstrap

Challenges & Solutions

Reports Without Frontend Releases

Problem

Analysts wanted to add and change benchmarking reports often. Hardcoding each report layout in React meant a frontend release for every change.

Solution

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

Problem

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.

Solution

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

Problem

Clicking a bar in a distribution chart had to open the detail for that quartile and year without re-rendering the whole report.

Solution

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.

Key Achievements

Express Report Engine
Access-scoped tokens, report and dashboard endpoints
Peer Benchmarks
Median, quartiles and multi-year trends per indicator
Server-Driven UI
New reports ship without a frontend release
Drill-Downs
Chart clicks return only the block to replace