Case study · Health data / public interest

Government data, arranged the way a patient actually needs it

  • Python
  • TypeScript
  • Cloudflare Pages
  • AIHW MyHospitals API
  • WCAG 2.2 AA
✓ 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
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

The challenge

Official reporting publishes each hospital's waiting times against national and peer averages, but never 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 (kept separate by design, because they measure different things), publishing a fully static comparison site where every figure carries its reference period and release date.

  • 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 - zero-JavaScript data pages
  • Stateless compare tool: no cookies, no storage, no search terms in the URL
  • CI gates: byte-identical rebuilds, WCAG 2.2 AA, HTML validity

The stack

A Python pipeline with schema and licensing gates that fail the build closed; pinned, checksummed source snapshots in object storage; a TypeScript static generator (deliberately not a framework) writing zero-JavaScript HTML pages; a stateless compare tool as progressive enhancement; WCAG 2.2 AA and byte-identical rebuilds enforced in CI; deployed to Cloudflare Pages.

DeliveryZero-JS static pages
Site generatorBespoke TypeScript, not a framework
Published distThe only pipeline-site interface
Data pipelinePython, fail-closed gates
Sources & snapshotsAIHW, ABS, QLD Health - checksummed

The outcome

The site makes visible what was previously buried in separate state reporting: for a prolapse repair in 2024-25, the median wait was 363 days at Royal Brisbane & Women's Hospital and 28 days at Tweed Valley Hospital, 96 kilometres away across the NSW border. Thousands of comparisons like that one are now a search away, every figure traceable 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 - the site updates when the data does, and 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, verified against the AIHW MyHospitals API.

Key Takeaways

Publishing health data without publishing a wrong number

  • The value added is the arrangement, not the data - every figure is a published government number.Critical

    Waiting times come from the AIHW national planned-surgery collection covering 151 procedure types at 293 public hospitals. 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 while being 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 must trace to a data or code change, which makes the whole corpus auditable rather than merely plausible.

  • Zero-JavaScript data pages keep every figure readable by people, crawlers and AI agents alike.Important

    Figures are present in the HTML rather than assembled at runtime, so the pages work on poor connections and with assistive technology. The compare tool is stateless progressive enhancement layered on top, never a prerequisite.

Surgery Waits compares published planned-surgery waiting times across nearby public hospitals, including across state borders. The engineering discipline is that the pipeline would rather fail a build than render a figure it cannot fully source, date and license.

Questions decision-makers ask about this build

Isn't this data already public?
Yes, and that is the point. Every figure is a published AIHW number covering 151 procedure types at 293 public hospitals. What official reporting does not publish is the comparison a patient actually needs: this surgery, at the hospitals within reach, ranked against each other, including across a state border. The data is not new and is not claimed to be - 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 sitting 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 published figure carries the reference period and release date it came from.
Why keep the AIHW and Queensland Health data separate?
Because they measure different things. The AIHW national collection and Queensland Health's quarterly release use different periods and definitions, so blending them would produce comparisons that look precise without being comparable. They are kept as distinct sources by design, each labelled with its own provenance, and the site never silently merges them into a single number a reader would take as like-for-like.
What does a byte-identical rebuild actually buy you?
Reproducibility as a property you can test. The same pinned, checksummed source snapshot always produces exactly the same site, and that is enforced in continuous integration - so any change in output must come from a change in data or code, never from a non-deterministic build. For published health figures it means every number can be traced back to and regenerated from its source release.
Why a bespoke static generator and zero JavaScript on the data pages?
The data pages are documents, not applications. A bespoke TypeScript generator writing plain HTML keeps every figure present in the markup - fast on a poor connection, and readable by screen readers, crawlers and AI agents without executing anything. The compare tool is layered on as stateless progressive enhancement, with no cookies, no storage and no search terms in the URL.
How does the site stay current as new data is released?
New AIHW annual and Queensland Health quarterly releases flow through the same gated pipeline, so the site updates when the data does. A release that fails a licensing, schema or determinism gate never ships. That makes the failure mode a site that is briefly out of date, rather than one quietly publishing a wrong number that looks exactly as authoritative as a right one.

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 data analysis and insight platforms and custom web applications, part of our wider custom software development work.

Want a platform like this for your business?

Tell us what you're building. We'll reply within one business day with next steps, not a sales deck.