Data files

This publication contains the following data files for a rolling five-year trend, broken down into quarters.

  • Only acute hospitals are included in the data files.
  • Only acute specialties are included in the inpatient and day case files.

Find out more in the methods used to produce this data release.

Outpatient activity to September 2023

These data files contain information on new and return outpatient attendances and 'Did Not Attend (DNA)' appointments for consultant-led activity only.

These data files are split by:

  • location (NHS Board of treatment/residence, hospital and council area)
  • specialty
  • age and sex
  • Scottish Index of Multiple Deprivation (SIMD) quintile

NHS Board of residence files only contain data for new outpatient appointments, as the ISD(S)1 data source for return outpatient appointments does not contain residence information.

ISD(S)1 also does not record information on the age or sex of patients, or the deprivation of the area in which they live.

Outpatients cross-boundary flow
Data covered File name
New attendances Outpatients cross-boundary flow to September 2023 CSV | 370.6KB
Variable name Definition Format Missing value
appt_type Outpatient appointment type: ‘New’, ‘Return’, ‘All’ (total of ‘New’ + ‘Return’) or ‘DNA’ Text NA
count Number of appointments Number NA
rate Only available for DNAs. DNA rates are calculated from new appointments only and are presented as a percentage of the total number of outpatient appointments. Number NA

Inpatient and day case activity to September 2023

These data files report figures for both episodes and stays and are split by:

  • location (NHS Board of treatment/residence, hospital and council area)
  • age and sex
  • Scottish Index of Multiple Deprivation (SIMD) quintile
  • specialty

Specialty breakdowns are reported by episodes and spells, rather than stays.

Information is included for:

  • emergency admissions
  • elective admissions
  • total inpatients
  • day cases
  • total inpatients and day cases
  • transfers
  • not specified
Inpatient and day case cross-boundary flow
Data covered File name
Episodes and stays Inpatient and day case cross-boundary flow to September 2023 CSV | 408.7KB
Variable name Definition Format Missing value
measure Inpatient/admissions type: 'Elective Inpatients', 'Emergency Inpatients', 'Transfers', 'Not Specified', 'All Day cases', 'All Inpatients', 'All Inpatients' and 'Day cases' Text NA
eps Number of episodes Number NA
spells Number of specialty spells Number NA
stays Number of stays Number NA
los Total length of stay/spell Number NA
avlos Average length of stay/spell Number NA

Hospital beds to September 2023

Data for beds are only available by NHS Board of treatment, as the ISD(S)1 data source does not contain residence information.

ISD(S)1 also does not record information on age or sex of patients, or on deprivation of the area in which they live.

These data files are split by:

  • location (NHS Board of treatment and hospital)
  • specialty

Information is included for:

  • number of available staffed bed days
  • total number of occupied bed days 
  • average number of available staffed beds per day
  • average number of occupied beds per day
  • percentage (%) occupancy
Hospital beds
Data covered File name
Bed numbers and occupancy Beds by NHS Board of treatment and specialty to September 2023 CSV | 4.5MB
Variable name Definition Format Missing value
aasb Quarterly available staffed bed days (number of available staffed bed days over the quarter) Number NA
tobd Quarterly occupied bed days (total number of occupied bed days over the quarter) Number NA
asb Daily average available staffed beds (average number of available staffed beds per day) Number NA
aob Daily average occupied beds (average number of occupied beds per day) Number NA
p_occ Percentage (%) occupancy Number NA

Estimating the total number of beds available for use by different services and/or departments

Due to the way specialties are recorded for beds data, it is not possible to use the PHS beds statistics to estimate the total number of beds available for use by different services and/or departments.

For example, selecting the paediatric specialty grouping will only provide a partial picture of the staffed beds that are used for children’s services. This is because many beds used for children are not recorded under paediatric specialties and are instead recorded under more specific specialties, such as Haematology, Neurology and Respiratory Medicine.

In addition, the specialty recorded for a bed depends partly on what the patient is being treated for. This means that the mix of specialties may change over time for some wards.

Similarly, analysis of the A&E specialty bed usage will only provide inpatient and day case information on beds within the A&E specialty, for example A&E ward beds and observation beds staffed overnight.

It will not provide information on the services or capacity within A&E departments as a whole.

Variable name Definition Format Missing value
quarter_date Final date of the quarter Date (dd/mm/yy) NA
quarter_name Quarter period in text format Text (mmm – mmm-yy) NA
hb_code NHS Board code: either the nine-digit NHS Board code or 'scot' for Scotland. For the residence data files, the NHS Board code and name refers to the NHS Board of residence. For the treatment data files, the NHS Board code and name refers to the NHS Board of treatment. Text NA
hb_name NHS Board name Text NA
loc_code Location code: either the five-digit hospital code, nine-digit NHS Board or council code, or 'scot' for Scotland Text NA
loc_name Location name Text NA
specialty Two-digit specialty code Text NA
spec_name Specialty name Text NA
sex_age Sex (male or female) and ten-year age bands combined Text NA
simd Quintiles of Scottish Index of Multiple Deprivation (1 = most deprived, 5 = least deprived) Number NA
hbtreat_currentdate NHS Board of treatment code Text NA
hbtreat_name NHS Board of treatment name Text NA
hbres_currentdate NHS Board of residence code Text NA
hbres_name NHS Board of residence name Text NA
attendances Number of attendances Number NA
boundary_ind Indicates whether the NHS Board of treatment is the same as the NHS Board of residence (0 = yes, 1 = no) Number NA
Last updated: 21 March 2024
Was this page helpful?