Data files

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

After publication, an issue was spotted in the SIMD data files whereby NAs appear in the SIMD column. This error is due to the lookup file not matching the data correctly. This issue has been resolved in more recent publications.

Outpatient Activity

These data files are split by location (NHS board of treatment/residence, hospital and council area), specialty, age and sex, and SIMD for new and Did Not Attend (DNA) appointments; and split by specialty and NHS board of treatment for return and total appointments.

Outpatients by NHS Board of residence to December 2019

Outpatients by NHS Board of treatment to December 2019

Outpatients Cross boundary flow to December 2019

See outpatient activity variables

The residence data files relate to activity by NHS Board of residence. The treatment data files relate to activity by NHS Board of treatment. Outpatient residence files only contain data for new outpatients as the ISD(S)1 data source for return outpatients does not contain residence information. ISD(S)1 also does not record information on the age or sex of patients, nor the deprivation of the area in which they live.

Inpatient and Daycase Activity

These data files are split by location (NHS Board of treatment/residence, hospital and council area), specialty, age and sex, and SIMD for both episodes and stays. Measures include emergency admissions, elective admissions, transfers, inpatients, daycases, and total inpatients and daycases.

Inpatient and daycase episodes by NHS Board of residence to December 2019

Inpatient and daycase episodes by NHS board of treatment to December 2019


Inpatient and daycase cross boundary flow to December 2019

See inpatient and day case activity variables

The residence data files relate to activity by NHS Board of residence. The treatment data files relate to activity by NHS Board of treatment.

Hospital Beds

The ISD(S)1 data source for beds does not contain residence information. ISD(S)1 also does not record information on the age or sex of patients, nor the deprivation of the area in which they live.

See hospital beds variables

File variables

Generic Variables
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 9 digit NHS Board code or "scot" for Scotland. For the residence data files, the NHS Board code and name is in relation to the NHS Board of residence. For the treatment data files, the NHS Board code and name is in relation to the NHS Board of treatment. Text NA
hb_name NHS Board name Text NA
loc_code Location code: Either the 5 digit hospital code; 9 digit NHS Board or council code; or “scot” for Scotland Text NA
loc_name Location name Text NA
specialty 2 digit specialty code Text NA
spec_name Specialty name Text NA
sex_age Sex (Male or Female) and 10 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 - no, 1 - yes) Number NA

 

Outpatients-specific variables
Variable name
Definition
Format
Missing value
appt_type Outpatient appointment type: New, Return, All Appointments (total of 'New' + 'Return') or DNA Text NA
count Number of appointments Number NA
rate Only available for DNAs, i.e. DNA rate. DNA rates are calculated from new appointments only and are presented as a percentage of the total number of outpatient appointment Number NA

 

Inpatients-specific variables
Variable name
Definition
Format
Missing value
measure Inpatient/admissions type: Elective Inpatients; Emergency Inpatients; Transfers; All Daycases; All Inpatients; All Inpatients and Daycases Text NA
eps Number of episodes Number NA
stays Number of stays Number NA
los Total length of stay Number NA
avlos Average length of stay Number NA

 

Beds-specific variables
Variable name Definition Format Missing value
aasb Quarterly available staffed beds Number NA
tobd Quarterly occupied beds Number NA
asb Daily Average available staffed beds Number NA
aob Daily Average occupied beds Number NA
p_occ Percentage (%) occupancy Number NA

 

Last updated: 13 June 2022
Was this page helpful?