Ward Round

A working demo of what AI can do with the AIHW MyHospitals Data API. It covers ~800 Australian public hospitals and 14 years of emergency department, elective surgery and infection-control data. Explore it, let the analytics flag what stands out, and ask Claude questions in plain English.

Unofficial demo, not produced or endorsed by AIHW.

Every figure carries a tag
APIReturned as-is by the MyHospitals API
DerivedCalculated in this page from API values (peer medians, clusters, projections)
ClaudeWritten live by Claude from the same data, when you ask
01 · National pulse

Where Australia's hospitals stand

Show the numbers as a table
02 · Ask the data

Ask a question in plain English

Claude answers by calling the same functions this page uses: search hospitals, rank them, pull trends, read a hospital's profile. You can watch each call in the trace. It can also move the map for you.

Checking whether Claude is available in this view…
03 · Hospital explorer

Any hospital, against its peers

Pick a hospital on the map or search by name. Each measure is placed within the hospital's AIHW peer group. The page also finds hospitals that do similar work, using size, surgical mix and specialised units rather than the official peer group.

04 · Signals

What stands out, found automatically

The page scans every hospital for four patterns: results far from the peer-group median (robust z-score of 2.5 or more), the largest five-year shifts, four straight years of falling ED performance, and hand hygiene below the national benchmark. These are prompts for a closer look, not findings.

05 · Archetypes

Three kinds of hospital, found by clustering

k-means clustering on five performance measures (ED within 4 hours, median ED stay, urgent patients seen on time, surgery wait, share waiting over a year) groups 190 hospitals that report all five. The groups were not defined in advance.

06 · Under the hood

How the API works, and what AI adds

The MyHospitals Data API is open, needs no key and returns JSON. Everything on this page came from three kinds of call.

Step 1 · Catalogue
GET /api/v1/reported-measures

693 reported measures: each of the 33 measures split by triage category, surgical specialty, infection type and so on. Pick the codes you need, such as MYH-RM0015 for ED visits completed within 4 hours.

Step 2 · Periods
GET /api/v1/datasets?reported_measure_code=MYH-RM0015

One dataset per reporting period, going back to 2011–12 for ED data and 2010 for hand hygiene.

Step 3 · Values
GET /api/v1/datasets/{id}/data-items

One value per hospital, network, state and peer group, with suppression codes and each hospital's peer group attached.

What AI adds to an open dataset

Finding thingsPlain-English questions become ranked, filtered queries. Claude picks the tool calls and you can see each one.
ContextEvery value sits beside its peer median and national figure, so nobody has to know the peer-group system to read it.
AttentionAnomaly and trend detection across 800 hospitals and eight measures surfaces about 190 signals worth a look.
StructureUnsupervised clustering and nearest-neighbour matching show patterns that the published peer groups do not.
NarrativeBriefings drafted from a hospital's numbers, with the numbers kept alongside for checking.

Practical notes from building this

  • The flat extract (/flat-data-extract/{category}) returns at most 1,000 rows a page. Elective surgery alone is 693,110 rows, so the datasets route above is far quicker.
  • The API refuses Python's default urllib user agent with a 403. Send your own User-Agent header.
  • There is no all-procedures total for elective surgery waits, only 12 specialties and 150+ procedures. This page weights the specialty medians by surgery counts and tags the result Derived.
  • Cost per NWAU stops at 2014–15 and cancer surgery waits at 2012–13, so they are left out.
  • Suppressed values carry codes such as NP, <5 and "interpret with caution", served from /caveats and /suppressions.
  • Responses send Access-Control-Allow-Origin: *, so a browser page can call the API directly.

What else could be built on this API

  • A monitor that polls version_information.data_version, diffs each release and writes a change note for every local hospital network.
  • Plain-language hospital pages for patients, in any language, generated from the same numbers with the caveats attached.
  • Estimates committee or board briefing packs drafted per hospital, with every figure traceable to a dataset ID.
  • Linking to ABS population and SEIFA data to separate demand growth from performance change.
  • Forecasting ED demand by hospital from the 14-year history, with uncertainty bands.

Caveats

  • Peer-group comparisons follow AIHW peer groups. "Unpeered" hospitals are not compared.
  • Signals flag difference, not quality. Case mix, reporting changes and small numbers all move results.
  • Projections are straight-line fits through the last five years, shown only as a talking point.
  • Claude's answers are drafted from the tool results. Check any figure against the table or profile before reusing it.