Accessibility statement

Central Hall, York University

Analysing Patient Data using Hospital Episode Statistics (HES)

Registrations have now closed.




I could not do what I do for the GIRFT programme without having done the course; it has proved to be invaluable.

Peter Lanyon,
Consultant Rheumatologist, Nottingham University Hospitals NHS Trust

NHS England Data contains Hospital Episode Statistics (HES) of all inpatient admissions and outpatient appointments, Emergency Care Data Set (ECDS) for all Accident & Emergency attendances to NHS hospitals in England and Patient Reported Outcome Measures (PROMs) data for health gain in patients undergoing certain surgeries (e.g. hip or knee replacement). The HES are the main data source for many healthcare analyses for the NHS, government, and other organisations and individuals. There is also an increasing role for this observational dataset in providing evidence-based parameters, which are not collected in trials for the economic evaluation of new technologies.

The HES Admitted Patient Care (APC) dataset is available from 1989 onwards and it provides records for admitted patient organised in episodes of care, known as finished consultant episodes (FCEs). Each FCE relates to a period of care for a patient under a single consultant at a single hospital. Recorded FCEs steadily increased from 12 million in 1999-2000 to 16.8 million in 2009-10 to 20.9 million in 2019-20. In 2020-21, 16.2 million FCEs were recorded, a decline of 22% from 2019-20, reflecting the impact of the coronavirus pandemic. There were 19.6 and 20 million FCEs recorded in 2021-22 and 2022-23, respectively, showing the increasing demand for NHS care. The HES Outpatient (OP) dataset is available from 2003. In 2020-21, 101.9 million outpatient appointments were recorded – about 20 million appointments less than in 2019-20. However, 122.3 and 124.5 million outpatient appointments were recorded in 2021-22 and 2022-23, respectively.

The HES Accident & Emergency (A&E) data was collected from 2007 to 2019/20, with 25 million A&E attendances recorded in 2019-20, more than double the number of A&E attendances recorded in 2007-08. In 2020-21, the Emergency Care Data Set (ECDS) replaced the HES A&E dataset as the national data set for urgent and emergency care. The number of A&E attendances in 2020-21 fell to 17.4 million due to the coronavirus pandemic. In 2021-22 and 2022-23, 24.4 and 25.3 million A&E attendances were recorded in ECDS.

The HES APC dataset is one of the most challenging datasets to get to grips with: complex coding of data items, data provided at a level which is not immediately amenable to analysis, missing data, duplicates, the need to cost episodes of care via HRGs, and other data issues mean that the analyst has significant upfront investment costs when starting to use the data for their research needs.

Taught by academics with extensive experience in using NHS England data, including HES (APC and OP), ECDS and PROMs for a wide range of outputs, this intensive workshop introduces participants to NHS England data and teaches them how to handle, manipulate and analyse these very large datasets. The course is organised according to a three-level structure. 

In the lectures, a theoretical background is provided for each topic. Additionally, paper exercises are given for a limited number of cases to ensure a good understanding of the theory. The lectures also include illustrative examples of how HES data can be used in practice to address selected research questions.

At the end of the course, the participants should understand the complex nature of NHS England datasets, understand the importance of approaching HES, ECDS and PROMs data with a disciplined structure and have the tools required to manipulate data from the raw form to that required for analysis.

I really liked the fact that the course gave a really good insight into HES (HES is amazingly complicated!)

Previous participant


This course includes instruction on how to:

  • understand, manage and manipulate HES APC, HES OP, ECDS PROMs
  • construct and analyse key variables such as waiting times or length of stay
  • analyse individual patient records defined as Finished Consultant Episodes, , as well as Provider Spells and Continuous Inpatient Spells
  • monitor emergency readmissions
  • link HES APC data to HES OP data, ECDS, and Civil Registration of Death.
  • aggregate data by Healthcare Resource Group (HRG) or providers/commissioners
  • cost data by HRG using the National Cost Collection data
  • use the data for benchmarking and policy evaluation


This course is offered to people working in the public sector, academia and the private sector. It is suitable for analysts who wish to harness the power of non-randomised episode-level patient data to shed further light on such things as patient costs and pathways, re-admissions and outcomes and provider performance. The workshop is suitable for individuals working in NHS hospitals, commissioning organisations and the Department of Health, pharmaceutical companies or consultancy companies and for health care researchers and PhD students. Overseas applicants may also find the tuition can be applied to similar scenarios in their own country, but must be aware that the tuition and exercises relate directly to HES data, which is created for, and used in, England.

The tutors will be presenting examples of software code (Stata) that can be used to program certain data tasks (familiarity with Stata is NOT required).  We will not hold dedicated computer-based sessions as the focus of the course is not on coding but on understanding HES data and learning how to approach and address various research questions drawing information from HES.


Course dates

Course dates

  • Monday 3 June - Wednesday 5 June 2024


Course Programme

Venue: Alcuin East Wing AEW/004, Alcuin College, University of York.

Day 1:

  • 10:30 - 11:00 - Registration and refreshments
  • 11:00 -11:15 - Introduction
  • 11:15 -12:00 - Introduction to NHS England data: Data-generating process and clinical coding; Inpatient data structure.
  • 12:00 - 12:30 - Introduction to NHS England data: Applying for NHS England datasets
  • 12:30 - 12:45 - Q&A
  • 12:45 -13:45 - Lunch
  • 13:45 - 14:15 - Paper exercise: examining an example HES inpatient extract
  • 14:15 - 16:00 - HES APC data manipulation: dictionaries; key variables; missing values; dates
  • 16:00 - 16:30 - Refreshments break
  • 16:30 - 17:15 - Illustrative example: Measuring resource use before and during the Covid-19 pandemic across types of care and patient groups.
  • 17:15 - 18:30 - Drinks Reception


Day 2:  

  • 9:30 - 10:30 - HES APC data manipulation - duplicate records, linking patient episodes
  • 10:30 - 11:00 - Illustrative example: Measuring socioeconomic inequalities in waiting times
  • 11:00 - 11:30 - Paper exercise: Linking patient episodes
  • 11:30 - 12:00 - Refreshments break
  • 12:00 - 13:00 - Measuring health improvements using Patient Reported Outcome Measures (PROMs)
  • 13:00 - 14:00 - Lunch
  • 14:00 - 15:00 - Linking inpatient data to other data (Civil Registration of Death – Secondary Care Cut data, ECDS, HES Outpatient).
  • 15:00 - 15:30 - Refreshments break
  • 15:30 - 16:30 - Paper exercise: HES Outpatient and ECDS data
  • 19:00 - 22:00 - Dinner


Day 3:

  • 9:45 - 11:00 - Introduction to Healthcare Resource Groups (HRGs) and grouping process (1st part)
  • 11:00 - 11:15 - Refreshments break
  • 11:15 - 12:45 - Introduction to Healthcare Resource Groups (HRGs) and grouping process (2nd part)
  • 12:45 - 13:45 - Lunch
  • 13:45 - 14:45 - The HRG Grouper: how to assign patients to HRGs and use of HRGs for costing purposes
  • 14:45 - 15:15 - Q&A



The tutors for this course are researchers in the Centre for Health Economics, University of York



Registration Information

Before you register on this course, please ensure you have secured the appropriate funding from your organisation.

Registration is done online by for instant payment by credit and debit card and a guaranteed secured place on this course (please note the University of York does not accept American Express cards).

We regret that we cannot reserve or hold places on this course in advance of booking or payment.


Fees are fully inclusive of tuition, lunches, drinks reception, course dinner and course materials, but do not include accommodation. VAT is not payable. 

Public/academic sector  Private/commercial sector 

Course fee 



* Public Sector discounted rate: We offer a public sector discounted rate which only applies to not-for-profit organisations (e.g. universities, charities, hospitals), government agencies and other public bodies worldwide. 

Full-time PhD students can apply for a subsidised place at £300 (VAT not payable). Places are limited and are allocated on a first come first served basis.

Registration fees are payable in advance of the workshop dates.

We regret that we cannot reserve or hold workshop places in advance of booking or payment.

Our short training courses do not carry any formal CPD (continuing professional development) accreditation.

**Registrations have now closed**

Cancellations and Alterations

For bookings of between 1 and 5 people from the same organisation:
A full refund of course registration fees (less a 10% administrative charge) will be made for cancellations received in writing at least one month prior to the course.
Cancellations made less than one month prior to the course are not refundable. 

For larger bookings of 6 or more people from the same organisation:
A full refund of course registration fees (less a 10% administrative charge) will be made for cancellations received in writing at least two months prior to the course.
Cancellations made less than two months prior to the course are not refundable. 

Substitutes can be made but please email the substitute delegate details as soon as these are known, to the Course Administrators

Transfers between CHE's short courses/workshops is not possible.

Deferrals may be given under extenuating circumstances but will only be valid until the end of the following year - after that there can be no further deferral or refund. 

In the unlikely event that, due to unforeseen circumstances, the course has to be cancelled by the University of York, our liability is limited to a refund of paid course fees only.


You are responsible for arranging your own accommodation.  Unfortunately, campus accommodation is not available - the University STEM Centre can provide updated information.  There are many hotels and guest houses locally (Fulford and Heslington are the closest areas).  Some of these hotels can be viewed on the following websites:  

Visit York

Expedia Fulford Hotels

Getting Here

Our main campus is in the south east of York within walking and cycling distance of, or a short bus ride from, the city centre.  Our address is: University of York, York, YO10 5DD.

By Bus, rail and taxi

Parking is limited, so we suggest alternative transport where possible. Once you’re here, it's easy to get around campus by bus, bike and foot.

Cars and Parking - Pay and display and short stay parking

Use our interactive Campus Map.  
The area you will require is Zone 3 in red.
For registration you will need the ARC Foyer which is Alcuin B Block. 
For the workshop you will require Alcuin East Wing.

Campus Map - MHSDS APD 2022




Who to contact

  • Tim Glover & Sarah Crust
    Course Administrators
    Tel:  +44 (0)1904 321436
            +44 (0)1904 321469

Course dates

  • 3 June - 5 June 2024