Case study · React / TypeScript / PostgreSQL
PGHT Reports
Ask a question, explore the report
Hospital price files contain negotiated amounts, payer names, billing classes, and care settings. PGHT Reports puts a chat interface and interactive charts over a 22,428-row extract from five Pittsburgh-area hospital files.
Ask a question, open the resulting report, and inspect the chart and its values. Curated examples include payer counts, stacked charts, metrics, and a payer-by-setting drilldown. Counts describe source-file entries, not patients or unique contracts.
A workspace you can keep
Copy an example or save a report from chat into My reports. Rename it, change it, duplicate it, or start over. Each visitor gets a workspace in their own browser, so exploring the demo leaves everyone else’s examples intact.
The browser saves the query and chart definition. Opening a saved report validates the query again and fetches its results, even after the server’s temporary report has expired. There is no account to create or scheduled reset to interrupt a session. Saved reports stay in that browser until removed; clearing the site’s browser data removes them too.
People and agents share the report
The built-in chat serves visitors directly. WebMCP exposes reporting actions to a compatible browser agent, so it can discover reports, open them, inspect their context, and read visible results from the same page the person is using. It can also save copies and edit personal reports in that browser’s workspace.
On desktop, chat sits beside the report in a pane you can resize or collapse. On a phone, switch between the report and a full-width conversation without losing your place. The browser remembers the desktop pane’s width and visibility.
A separate local MCP workflow supports report creation, preview, and publication. The public application protects the shared examples while allowing temporary exploration.
WebMCP requires a supporting browser and activation. The ordinary chat and reporting interface remains available without it.
What I built
The React reporting interface and backend connect questions to PGHT data. Charts, query results, and chat share the current report. The backend validates queries and manages temporary reports; the browser keeps each visitor’s saved definitions. The local MCP authoring interface and WebMCP tools provide two ways for agents to work with reports.
The broader PGHT project handles hospital-file ingestion and source-aware analysis. Its query MCP supports catalog discovery, validation, and execution. The reporting application uses a separate extracted dataset and has its own backend.
Published amounts are hospital-file observations. They do not predict an individual patient’s bill; comparisons depend on the selected sources, settings, and billing classes.
inside the reporting app · the hospital-file work · WebMCP browser support