---
type: CaseStudy
title: 'Surgery Waits: Comparable Hospital Waiting Times'
description: How National Digital built Surgery Waits - a deterministic pipeline and zero-JavaScript site comparing hospital surgery waits across state borders.
resource: https://nationaldigital.com.au/case-studies/surgery-waits/
tags:
  - health data analysis
  - open government data reporting
  - automated data pipeline development
  - accessible static website development
  - Health data
timestamp: '2026-08-19T00:00:00.000Z'
---

# Surgery Waits: Comparable Hospital Waiting Times

How National Digital built Surgery Waits - a deterministic pipeline and zero-JavaScript site comparing hospital surgery waits across state borders.

## Government data, arranged the way a patient actually needs it

Surgery Waits compares public-hospital planned-surgery waiting times for one procedure across nearby hospitals - including across state borders, which official reporting does not do.

## Architecture Diagram

- **Delivery** — Zero-JS static pages
- **Site generator** — Bespoke TypeScript, not a framework
- **Published dist** — The only pipeline-site interface
- **Data pipeline** — Python, fail-closed gates
- **Sources & snapshots** — AIHW, ABS, QLD Health - checksummed

## Surgery Waits by the numbers

Figures were read from the live site and verified directly against the AIHW MyHospitals API (data version 2026052802) on 2026-08-18; reference period 2024-25, released 28 May 2026.

- **Difference in wait for the same operation: 427 days** — An eardrum repair had a 736-day median wait at Lismore Base Hospital (NSW) and 309 days at Gold Coast University Hospital (QLD). _(Source: AIHW published figures, verified via MyHospitals API, 2026)_
- **Between those two hospitals: 95 km** — The distance separating Lismore Base Hospital from Gold Coast University Hospital. Crossing it changes the median wait for the same procedure by more than a year. _(Source: Straight-line distance between the two hospitals, 2026)_
- **Public hospitals you can compare: 293** — Every public hospital reporting to the national collection, compared within reach of a location - including across state borders. _(Source: AIHW national planned-surgery collection, 2024-25)_
- **Procedures you can compare: 151** — Published median waiting times for 151 types of planned surgery, ranked and compared per hospital. _(Source: AIHW national planned-surgery collection, 2024-25)_

**Methodology:** Waiting-time figures are AIHW-published medians for reference period 2024-25, verified against the MyHospitals API. The distance between the two named hospitals is a straight-line measurement, not a driving distance.

## Review

## Publishing health data without publishing a wrong number

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.

- **The value added is the arrangement, not the data - every figure is a published government number.** 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.** 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.** 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.** 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.** 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.

## 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.

## More of our work

- how2vote.au: A Provably Neutral Voting Tool
- Micro-X: Real-Time Medical Device Interface

*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](/ai-automation/data-analysis-and-insights) and [custom web applications](/digital-product-development/custom-web-applications), part of our wider [custom software development](/digital-product-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.

## Related

**Parent:**
- [Real platforms, in production.](/okf/case-studies.md)

**Related:**
- [NRMA Parks & Resorts: WordPress to Contentful Migration](/okf/case-studies/nrma-parks-and-resorts.md)
- [Luxico & Staylonger: One Property Management Platform](/okf/case-studies/luxico.md)
- [MyStrengths: Student Assessment Platform](/okf/case-studies/mystrengths.md)
- [Gratofy: Custom E-commerce Marketplace](/okf/case-studies/gratofy.md)
- [Micro-X: Operator and Passenger Interfaces for Imaging Hardware](/okf/case-studies/micro-x.md)
- [how2vote.au: A Provably Neutral Voting Tool](/okf/case-studies/how2vote.md)
- [Public Trails: Lawful Access, Computed from Official Records](/okf/case-studies/public-trails.md)
