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.”
Difference in wait for the same operation
Between those two hospitals
Public hospitals you can compare
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.
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?
What stops a suppressed or stale figure being presented as a real one?
Why keep the AIHW and Queensland Health data separate?
What does a byte-identical rebuild actually buy you?
Why a bespoke static generator and zero JavaScript on the data pages?
How does the site stay current as new data is released?
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.