How much does it cost to run a hospital, and what revenue streams are available to hospitals to help them raise money at a local level?
The NHS Estates Returns Information Collection (ERIC) seems to provide cost reports at local level and income reports at trust level.
Data link via Owen Boswarva.
import pandas as pd
url_trust = 'https://files.digital.nhs.uk/83/4AF81B/ERIC%20-%20201819%20-%20TrustData%20v4.csv'
df_trust = pd.read_csv(url_trust, encoding='latin1')
df_trust.columns = [c.strip() for c in df_trust.columns]
df_trust.head(3)
Trust Code | Trust Name | Old Commissioning Region | New Commissioning Region | Trust Type | Number of sites - General acute hospital (No.) | Number of sites - Specialist hospital (acute only) (No.) | Number of sites - Mixed service hospital (No.) | Number of sites - Mental Health (including Specialist services) (No.) | Number of sites - Learning Disabilities (No.) | ... | Fires recorded (No.) | False alarms - No call out (No.) | False alarms - Call out (No.) | Number of deaths resulting from fire(s) (No.) | Number of people injured resulting from fire(s) (No.) | Number of patients sustaining injuries during evacuation (No.) | Medical Records cost - Onsite (£) | Medical Records cost - Offsite (£) | Type of Medical Records (Select) | Medical Records service provision (Select) | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | R0A | MANCHESTER UNIVERSITY NHS FOUNDATION TRUST | NORTH OF ENGLAND COMMISSIONING REGION | NORTH WEST COMMISSIONING REGION | ACUTE - TEACHING | 3 | 4 | 1 | 3 | 0 | ... | 15 | 0 | 334 | 0 | 0 | 0 | 2,871,339 | 145,631 | 3. Mixed | Internal |
1 | R1A | WORCESTERSHIRE HEALTH AND CARE NHS TRUST | MIDLANDS AND EAST OF ENGLAND COMMISSIONING REGION | MIDLANDS COMMISSIONING REGION | COMMUNITY | 0 | 0 | 1 | 5 | 1 | ... | 3 | 7 | 7 | 0 | 0 | 0 | 169,347 | 118,345 | 3. Mixed | Hybrid |
2 | R1C | SOLENT NHS TRUST | SOUTH OF ENGLAND COMMISSIONING REGION | SOUTH EAST COMMISSIONING REGION | COMMUNITY | 0 | 0 | 1 | 0 | 0 | ... | 1 | 35 | 1 | 0 | 1 | 0 | 39,584 | 83,204 | 3. Mixed | Hybrid |
3 rows × 55 columns
cols = ['Income from car parking - patients and visitors (£)', 'Income from car parking - staff (£)']
from ipywidgets import Dropdown, interact
region_widget = Dropdown(options = df_trust['New Commissioning Region'].unique())
trust_widget = Dropdown()
# Define a function that updates the content of y based on what we select for x
def update_trusts(*args):
trust_widget.options = df_trust[df_trust['New Commissioning Region']==region_widget.value]['Trust Name'].unique()
region_widget.observe(update_trusts)
# Some function you want executed
def trust_report(region, trust):
return df_trust[df_trust['Trust Name']==trust][['Trust Name']+cols]
interact(trust_report, region = region_widget, trust = trust_widget);
interactive(children=(Dropdown(description='region', options=('NORTH WEST COMMISSIONING REGION', 'MIDLANDS COM…