Skip to main content
Contact us

Case study · Health data / public interest

Government data, arranged the way a patient actually needs it

Surgery Waits is a National Digital product. It compares public-hospital waiting times for one planned surgery across nearby hospitals, including across state borders.

National Digital builds data APIs and pipelines that turn published data into a service people and agents can query.

Last updated

At a glance

Industry
Health data / public interest
Engagement type
In-house product
First release
2026
Team
National Digital engineering team

✓ Verified Review

“Health data punishes sloppiness: a suppressed figure rendered as zero is a lie, and a stale figure carried forward is a different lie. So the pipeline fails closed - an unlicensed source, a figure missing its reference period, or a value in a suppressed cell stops the build. The result is a site where every number can be traced to the government release it came from.”

Cameron Young CEO at National Digital

Surgery Waits by the numbers

  • 427 days

    Difference in wait for the same operation

  • 95 km

    Between those two hospitals

  • 293

    Public hospitals you can compare

  • 151

    Procedures you can compare

  • 4

    Tools on the MCP server

The Surgery Waits website, showing the surgery search and the list of common surgeries.

The challenge

Official reporting publishes each hospital's waiting times against national and peer averages, but not the comparison a patient needs: nearby hospitals ranked against each other for one procedure, across state lines. Health data also demands unusual care. Suppressed figures must never render as zero, and stale figures must never be carried forward.

What we built

A deterministic data pipeline over the AIHW national collection and Queensland Health's quarterly release, which are kept separate because they measure different things. It publishes a static comparison site where every figure carries its reference period and release date, plus a JSON API and an MCP server that answer from the same built files.

  • Deterministic Python data pipeline with fail-closed licensing and provenance gates
  • Source adapters for the AIHW national collection and QLD Health quarterly release
  • Suppression-safe rendering: 'not published' is never shown as zero or a rank
  • Bespoke TypeScript static generator that writes data pages without JavaScript
  • A static JSON API with an OpenAPI description, and a read-only MCP server for AI assistants
  • Stateless compare tool: no cookies, no storage, no search terms in the URL
  • CI gates: byte-identical rebuilds, WCAG 2.2 AA, HTML validity

What we built in each area

  • Website & apps

    A bespoke TypeScript static generator writes the comparison pages without JavaScript. Accessibility and byte-identical rebuilds are enforced in CI.

    • TypeScript
    • Cloudflare Pages
    • axe-core
  • Data & reporting

    A Python pipeline with schema and licensing gates builds from pinned, checksummed source snapshots in object storage.

    • Python
    • Cloudflare R2
  • Integration layer

    A static JSON API with an OpenAPI description and a read-only MCP server answer from the same built files. The pipeline reads the AIHW MyHospitals API.

    • OpenAPI
    • Model Context Protocol
    • AIHW MyHospitals API

The outcome

The site makes visible what separate state reporting buries. For eardrum repair in the AIHW release for the 2024-25 year, the published median wait at Lismore Base Hospital in New South Wales was 427 days longer than at Gold Coast University Hospital in Queensland, about 95 km away. Every comparison like that one is a search away, and every figure traces to its government source, reference period and release date.

Where it went next

New AIHW annual and QLD Health quarterly releases flow through the same gated pipeline. A scheduled workflow polls for a new AIHW data version and opens a manifest change as a pull request, so a release that fails a licensing, schema or determinism gate never ships.

This case study describes a live public-interest product designed and built by National Digital. All waiting-time figures are published government numbers, read from the site's own data API for the reference period in the AIHW release of 28 May 2026.

Key Takeaways

Publishing health data without publishing a wrong number

  • The value added is the arrangement of the data. Every figure is a published government number.Critical

    Waiting times come from the AIHW national planned-surgery collection. What is new is ranking nearby hospitals against each other for one procedure and naming the nearest cross-border alternative.

  • Fail-closed gates mean a suppressed figure can never render as a zero or a rank.Critical

    Missing reference periods, suppressed cells and unlicensed sources stop the build. In health data a plausible-looking default is more dangerous than a visible gap, because a patient may act on it as though it were a real measurement.

  • Sources that measure different things are kept separate rather than blended into one number.Critical

    The AIHW national collection and Queensland Health's quarterly release use different periods and definitions. Keeping them distinct and separately labelled avoids comparisons that look precise but are structurally invalid.

  • Byte-identical rebuilds make every published figure reproducible from its pinned source.Important

    Determinism is enforced in continuous integration, so identical inputs always produce identical output. Any difference in the published site traces to a data or code change, which makes the whole corpus auditable.

  • One set of built files serves people, crawlers and AI agents.Important

    Figures are present in the HTML, in a static JSON API and in the answers of a read-only MCP server, and all three read the same built files. Pages work on poor connections and with assistive technology, and the compare tool is progressive enhancement and never a prerequisite.

Surgery Waits compares published planned-surgery waiting times across nearby public hospitals, including across state borders. The pipeline fails a build before it renders a figure that it cannot source, date and licence, and the same figures reach people, developers and AI assistants.

What problem does Surgery Waits solve?

Official reporting publishes each hospital waiting time against national and peer averages. It does not rank nearby hospitals against each other for one procedure, or compare across state lines, which is the comparison a patient needs.

What did National Digital build for Surgery Waits?

National Digital built a deterministic Python pipeline over the AIHW national collection and the Queensland Health quarterly release. It publishes a static comparison site where every figure carries its reference period and release date, plus a JSON API and an MCP server that answer from the same built files.

Did a client commission Surgery Waits?

No client commissioned it. Surgery Waits is a National Digital product, and National Digital built it and runs it. The first release was in 2026.

What can a patient compare on Surgery Waits?

The site covers 151 surgery types at 293 public hospitals, ranked by published median wait. Every figure traces to its government source, reference period and release date.

Questions about Surgery Waits and how it was built

Isn't the data on surgerywaits.au already public?

Yes. Every figure is a published AIHW number covering 151 procedure types at 293 public hospitals. Official reporting does not publish the comparison a patient needs: one surgery, at the hospitals within reach, ranked against each other, including across a state border. The data is not new. The arrangement of it is what the product adds.

What stops a suppressed or stale figure being presented as a real one?

The pipeline fails closed. A figure missing its reference period, a value in a suppressed cell, or a source without clear licensing stops the build rather than rendering a default. 'Not published' is never shown as zero and never given a rank, because in health data a zero is a lie a patient could act on. Every figure carries the reference period and release date it came from.

How does an AI assistant use the Surgery Waits MCP server?

An assistant connects to the read-only MCP server at surgerywaits.au/mcp. Its tools return the published wait for one surgery at a hospital, a state or the nation, compare hospitals near a suburb, resolve everyday words such as knee replacement to a surgery, and explain urgency categories. The server answers only from the site's built files, so every answer carries the reference period and release date.

Can developers get the Surgery Waits data as JSON?

Yes. The site publishes the same figures as static JSON files under surgerywaits.au/data-api/, described by an OpenAPI document. There are no keys, accounts or query parameters. Each file carries its reference period and release date, and a suppressed figure has a null value and the display text 'not published'. The source licences stay with the data, and each file names the publisher to credit.

Why keep the AIHW and Queensland Health data separate?

They measure different things. The AIHW national collection counts surgeries by procedure over a financial year, and Queensland Health's quarterly release counts patients by specialty and urgency category over a quarter. Blending them would produce comparisons that look precise without being comparable, so each source stays distinct and labelled with its own provenance.

What does a byte-identical rebuild give surgerywaits.au?

Reproducibility as a property that CI tests. The same pinned, checksummed source snapshot always produces the same site, so any change in output comes from a change in data or code. For published health figures, every number can be regenerated from its source release.

Why does surgerywaits.au use a bespoke static generator with no JavaScript on data pages?

The data pages are documents, not applications. A TypeScript generator that writes plain HTML keeps every figure in the markup, so pages load fast on a poor connection and read correctly in screen readers, crawlers and AI agents. The compare tool is stateless progressive enhancement, with no cookies, no storage and no search terms in the URL.

How does Surgery Waits stay current as new data is released?

A scheduled workflow polls for a new AIHW data version and opens a pull request that updates the pinned snapshot. The new data reaches production only by passing the licensing, schema and determinism gates. The failure mode is a site that is briefly out of date, and never one that quietly publishes a wrong number.

More of our own products

What's next

Working with data you have to get right?

Surgery Waits is built on a pipeline that would rather fail a build than publish a wrong number. If your data carries the same stakes, see how we approach API development, data analysis and insight platforms and custom web applications.

Want a platform like this for your business?

Tell us what you're building. We'll come back within one business day with what we'd do first and what it would take.