Where Australia's hospitals stand
Show the numbers as a table
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.
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.
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.
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.
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.
GET /api/v1/reported-measures693 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.
GET /api/v1/datasets?reported_measure_code=MYH-RM0015One dataset per reporting period, going back to 2011–12 for ED data and 2010 for hand hygiene.
GET /api/v1/datasets/{id}/data-itemsOne 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 things | Plain-English questions become ranked, filtered queries. Claude picks the tool calls and you can see each one. |
| Context | Every value sits beside its peer median and national figure, so nobody has to know the peer-group system to read it. |
| Attention | Anomaly and trend detection across 800 hospitals and eight measures surfaces about 190 signals worth a look. |
| Structure | Unsupervised clustering and nearest-neighbour matching show patterns that the published peer groups do not. |
| Narrative | Briefings 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.