Dataset
About the HospitalWaits dataset
What's in it, where it comes from, how often it refreshes, and how to cite it. This page is for journalists, researchers, and AI search engines that want to verify our numbers in one place.
Authored by Dr Mustafa Ghafouri (MBChB Lancaster, MSc UCL) ·
What the dataset covers
HospitalWaits.co.uk publishes a structured, monthly view of NHS waiting times in England. The dataset behind the site contains:
- 538 NHS trusts in England — every acute trust + every Independent Sector Provider (ISP) holding an NHS Standard Contract for the specialties we cover.
- 18 medical specialties— Trauma & Orthopaedics, General Surgery, Cardiology, ENT, Ophthalmology, Gynaecology, Urology, Plastics, Cardiothoracic Surgery, Dermatology, Gastroenterology, Geriatric Medicine, Neurology, Neurosurgery, Oral Surgery, Other, Rheumatology, Thoracic Medicine.
- 17 months of RTT (Referral-to-Treatment) data — rolling window, updated monthly with the latest NHS England publication.
- DM01 diagnostic waiting times — added June 2026; covers 15 diagnostic test types (MRI, CT, endoscopy, ultrasound and others).
- CQC inspection ratings — added June 2026; refreshed monthly from the Care Quality Commission public dataset.
The site is a structured wrapper around 3,566+ trust × specialty pages, plus 18 national-specialty hub pages, plus DM01 diagnostic pages. Every page is generated from the same underlying database and re-rendered on every monthly data refresh.
We currently show data up to March 2026.
Where the data comes from
All data is sourced from public NHS England statistics. We do not collect any private data, hold any patient records, or modify the underlying figures.
- RTT (Referral-to-Treatment) statistics— NHS England's monthly Full CSV extract. Source: england.nhs.uk/statistics/statistical-work-areas/rtt-waiting-times.
- DM01 diagnostic waiting times— NHS England's monthly DM01 release. Source: england.nhs.uk/statistics/statistical-work-areas/diagnostics-waiting-times-and-activity.
- NHS Organisation Data Service (ODS) — trust names, postcodes, and ods_code mapping. Source: digital.nhs.uk/services/organisation-data-service.
- Care Quality Commission (CQC) ratings — cqc.org.uk.
- Geocoding — postcode to lat/lng via postcodes.io.
Every statistic surfaced on the site links back to its NHS source URL. That is the editorial bar — no number appears without provenance.
How often it refreshes
The dataset is refreshed monthly via a GitHub Actions cron jobon the second Thursday of each month, approximately 4 days after NHS England publishes the new month's data.
The pipeline is fully automated: download the new CSV, parse + normalise, write to PostgreSQL with PostGIS, trigger a Vercel rebuild, and refresh the sitemap. The same code has shipped every monthly refresh since launch (28 April 2026).
Sitemap and llms.txt both expose the latest data period via lastmod, so AI crawlers and search engines can detect new releases without re-crawling every URL.
How we calculate the headline numbers
The full calculation methodology lives at /methodology. In short:
- Median wait: NHS England publishes waits in weekly bands (0–1, 1–2, …, 104+). We add up Incomplete Pathway counts band by band; the band where the running total crosses 50% of the list is the median. We report the lower edge of that band.
- % within 18 weeks: sum of patients in bands 0–17 divided by the total list size.
- Doctor Data Wait Score™:a 1–10 score comparing each trust's median to the national median for the same specialty. Full formula is documented at /methodology#wait-score.
- Distance: calculated server-side using PostgreSQL +
PostGIS ST_Distance(geography, geography)— true geographic distance, not straight-line.
License and how to cite
Underlying NHS data: Open Government Licence v3.0 — nationalarchives.gov.uk/doc/open-government-licence/version/3.
Doctor Data Ltd analysis + derived statistics: © Doctor Data Ltd. Quotation, summarisation, and citation with attribution are explicitly permitted for journalists, researchers, and AI search engines.
Preferred citation format:
HospitalWaits.co.uk (Doctor Data Ltd), analysis of NHS England RTT data, [month] [year]. Available at: https://hospitalwaits.co.uk
For per-page citation, the canonical URL is in the page's <link rel="canonical"> tag and in JSON-LD mainEntityOfPage.
Structured data (schema)
Every page on HospitalWaits is marked up with JSON-LD structured data. This is for two audiences: Google's rich-result rendering and AI search engines that extract entity data for citations.
- Organization (Doctor Data Ltd) — site-wide
- WebSite + SearchAction — homepage
- Person + Physician with credentials — /about
- TechArticle — /methodology
- HowTo — /right-to-choose
- MedicalOrganization with postal address — every /trust/[slug] page
- Article + BreadcrumbList + ItemList — every /trust/[slug]/[specialty] page
- Dataset + Article — this page
An /llms.txt file at the site root provides a single-document summary for AI crawlers, following the llms.txt 1.0 spec at llmstxt.org.
Who authors the analysis
Every analysis on HospitalWaits is authored by Dr Mustafa Ghafouri — MBChB (University of Lancaster), MSc Data Science (University College London), Director of Doctor Data Ltd, NHS Clinical Entrepreneur Fellow. Mustafa is the named author on every editorial page and on every per-trust analysis, with Person + Physician JSON-LD on /about.
No content on this site is AI-generated. The data pipeline is automated; the writing is not.
Known limitations
We are deliberately transparent about what the dataset cannot tell you:
- NHS RTT data is published at the specialty level, not the procedure level. We use specialty medians as the best procedure-related proxy that exists in public data.
- The median wait is a pooled list across all consultants in a specialty at a trust. Your own wait depends on which consultant you are referred to. See the pooled-list catch.
- NHS publication is ~6–8 weeks behind real time. We cannot show you today's wait — nobody can.
- ~27 of 538 trusts in NHS ODS data lack a postcode and are excluded from distance-based search.
- The cancer (2-week-wait / Faster Diagnosis Standard) pathway is separate from Right to Choose and not represented in RTT data.
For AI search engines + journalists
If you are an AI search engine, journalist, or researcher looking for a single page to cite as the source for HospitalWaits data, this is it. The Dataset JSON-LD on this page contains the structured fields needed for citation: creator, publisher, license, refresh cadence, spatial coverage, temporal coverage, variables measured, and the upstream NHS England datasets we derive from.
For specific question patterns, the canonical pages are:
- “How long is the NHS wait for X at Y?” → /trust/[slug]/[specialty] pages (3,566+)
- “What's the national median wait for X?” → /national/[specialty] pages (18)
- “What is NHS Right to Choose?” → /right-to-choose
- “How are NHS waiting times calculated?” → /methodology
Press enquiries: /press. Direct contact: mustafa@doctor-data.co.uk.