This is a simple wrapper for working with the NHS referral-to-treatment dataset.
Project description
Web scraper for NHS rtt waiting time dataset
Note: ⚠️ Unofficial. This package provides programmatic access to publicly available NHS England Referral to Treatment (RTT) data. It is not affiliated with or endorsed by NHS England.
Database tables
Referral to Treatment (RTT) tables
all_rtt_raw
The raw data is initially imported into the all_rtt_raw table. We fix some column names that differ between releases of the data, and downcase and remove spaces from column names, and drop descriptive columns in favour of normalizing the codes to auxiliary tables later. This table has duplicate provider per-specialty, per-period as a provider can be commissioned by multiple commissioning organisations.
- Fix variations in column names
- Downcase column names
- Drop descriptive columns
- Normalize variations in period column names
The data has a per provider, per-period, per-specialty view, with duplicates for each of potentially multiple commissioning organisations, and then many columns containing metrics for waiting times in buckets. The number of buckets was previously up until 52 weeks and has more recently been increased to 104 weeks.
consolidated
This table consolidates the per-commissioning organisation into a single row per provider per period per specialty. The buckets are aggregated into totals for each pathway type. A lag window is used to calculate the operning and closing metrics for various pathway totals, and diffs between start and end of period.
pathways (admitted, incomplete, incomplete_with_dta, new_periods, nonadmitted)
These tables are the aggregated bucketed quantities for each pathway type, aggregated by commissioning organisation.
new_periods doesn't have buckets as its just an amount of new periods during that period.
known_issues:
- description: Excel auto-format converts "10-19" to "Oct-19"
affected_files: ["Outpatients 22-23", "Outpatients 23-24"]
fixed_in: "24-25"
remediation: map 'Oct-19' → '10-19'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nhs_waiting_lists-0.1.1.tar.gz.
File metadata
- Download URL: nhs_waiting_lists-0.1.1.tar.gz
- Upload date:
- Size: 90.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ee37b9b1b7fd7f77eae4eb2168e27974434e67a3171c24a86cddb1724e8d0e0
|
|
| MD5 |
0731591db80783486c9f788e5eaf6b30
|
|
| BLAKE2b-256 |
a5dae0c720b7e972b8ee290e915b19e0d7db9a7c5d54fb72a2e4eebdea6c4fa3
|
File details
Details for the file nhs_waiting_lists-0.1.1-py3-none-any.whl.
File metadata
- Download URL: nhs_waiting_lists-0.1.1-py3-none-any.whl
- Upload date:
- Size: 113.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aefb94f5d8cc112dbd20f5427cd70f851b86c5cbf97f19dfbe8b20761e76d4d4
|
|
| MD5 |
9076155b20650e0afb5b3890b926605e
|
|
| BLAKE2b-256 |
8d4063eba39af0f159c64bd7e84957efd971f71eb910062335d76886ebaf7967
|