Skip to main content

Provider mapping in HES

Guidance explaining how Hospital Episode Statistics (HES) provider mapping process works. This process ensures that every record in HES has a valid provider code attached to it.

HES is a cleaned, standardised version of SUS (Secondary Uses Services) data. Unfortunately not all records are submitted to SUS with a valid provider code. Records without a valid provider code in HES will not be attributable to anyone; this will lead to any derivations based on the provider code field being incorrect and may result in duplicate or invalid data.

As all records within HES must be attributable to a provider, HES attempts to correct or ‘map’ any record that doesn’t have a valid provider code.


The HES provider mapping process

Provider code validation

The provider code (PROCODE) field in HES identifies the organisation acting as a health care provider. This field is taken from the ‘Organisation Code (Code of Provider)’ field in SUS.

All provider codes in HES are validated against codes published by the Organisation Data Service (ODS), who are responsible for issuing and managing codes for organisations that interact with any area of the NHS.

For the purposes of HES, a provider code is considered valid if

  • the organisation is within the scope of HES - i.e. it is an English organisation that may provide NHS-funded secondary care, and
  • it is in the correct format, and
  • the open and close dates of the organisation are considered valid

Valid organisation types in HES

The following ODS organisation types are currently classed as valid providers in HES:

  • NHS trusts
  • care trusts
  • Clinical Commissioning Groups (CCGs)
  • non-NHS organisations
  • independent sector healthcare provider sites

In earlier HES years, other organisation types may be valid. For example, Primary Care Trusts (PCTs) were valid providers until they were abolished in March 2013.

Provider code format 

There are different guidelines for submitting provider codes for NHS and non-NHS providers

  • NHS organisations: The submitted code should represent the code of the organisation (e.g. the NHS Trust). Where a site code is submitted in the provider code field by an NHS organisation, the code for the parent organisation of that site is identified and used in the provider mapping process.
  • non-NHS or Independent Health Care Providers (IHPS): The submitted code must represent the site code of treatment. If a code for the parent organisation is submitted by a non-NHS or independent provider, this is classed as invalid in HES

Data validation

The dates used to assess whether the provider code is valid in HES changed in April 2021

HES data from April 2021 onwards

The open and close dates of the organisation as recorded by ODS must indicate that the provider was open on the date that the activity was carried out. The activity date in HES is classed as:

  • A&E: the arrival date
  • APC finished episodes: the episode end date
  • APC other birth events and other delivery events: the delivery date
  • OP: the appointment date

HES data before April 2021

The organisation open and close dates must indicate that the organisation was open on the last day of the HES period (for the annual HES data sets, this is 31 March).


Provider mapping process

During the production of the provisional monthly HES data sets, provider mapping occurs automatically. For the annual data sets, there may be additional manual changes made to provider codes. The below chart illustrates the provider mapping process.

chart showing the HES provider mapping process

What this image shows

Monthly provisional data sets 

Is the provider code valid?

Yes map to successor provider code

No - Is there a successor provider code?

Yes - map to successor provider code

No - Is there a valid site of treatment?

Yes map to site of treatment

No is there a valid sender code?

Yes Yes map to sender code

No flag as  invalid and delete record.

End 

Annual refresh data sets

Start

Is provider code valid? 

Yes has the provider rejected the automatic changes?
no - is there a successor provider code?

Yes- map to successor provider code

No is there a valid site of treatment? 

Yes map to site of treatment.

No Is there a valid sender code

Yes - map to sender code.

No - flag as invalid and delete records.

Map to sender codes

(Has) the provider rejected the automatic changes? 

Yes - map to specified by the provider

No - End. 


Monthly (provisional) HES data sets

If the submitted provider code is invalid, the following process is used to determine any mapping required:

  • first pass: the code is checked against successor code reference data taken from the succ.csv file published by ODS. If there is a successor for that provider, then the provider code is updated to the successor.
  • second pass: the Site Code of Treatment (SITETRET) field is checked – if a valid organisation code can be identified from this field, then the provider code is updated to the SITETRET (for non-NHS providers) or the parent organisation of the SITETRET (for NHS providers).
  • third pass: the CDS Sender Code (SENDER) field is checked – if a valid organisation code can be identified from this field, then the provider code is updated to the SENDER (non-NHS providers will be updated to SENDER if it contains a site code, NHS organisations will be updated to the organisation code of the sender).
  • final stage: if no valid code has been determined by the end of the third pass, then the provider code is set to 9X9X9, which results in the record being deleted from HES.

For example, a record in the APC extract has a provider code of 123, a site of treatment of 5AN01 and a sender code of 5AN00

  • the first pass attempts to see if any valid successor can be found for the provider code. 123 has never been a valid code – so it has no successor. So no mapping occurs and it moves onto the second pass
  • the second pass attempts to map to 5AN01. 5AN01 is no longer a valid code – so no mapping occurs and it moves onto the third pass
  • the third pass again attempts to map to 5AN00. 5AN is still not a valid code – so no mapping occurs and it moves onto the final stage and marks the record for deletion

Annual refresh data set

Providers have the opportunity to fix invalid codes in SUS throughout the year. Once the HES annual refresh deadline has passed, there are no further opportunities for corrections made in SUS to be reflected in HES. The automatic provider mapping process also occurs in annual refresh, unless the provider in question requests otherwise i.e. they have rejected the automatic changes.


Organisation code structure

ODS changed the structure of organisation codes in 2020. This affects the codes we see in fields used by the provider mapping process in HES, such as PROCODE and SITETRET:

For organisation and site codes allocated by ODS prior to October 2020:

  • organisations were allocated a main 3-character code which represents the organisation (e.g. an NHS Trust), and 5-character codes to represent sites within that organisation. Sites were allocated the same first 3 characters as the organisation code, with the remaining 2 characters being used to identify the site within that organisation
  • organisation codes that began with an '8' represent non-NHS organisations and do not follow the same format - these codes are 5 characters long and cannot be grouped based on the first 3 characters of the code

For organisation and site codes allocated by ODS on or after 1st October 2020

  • organisation and site codes are all 5 characters in length, with an alternating ANANA alphabetic-numeric structure (where ‘A’ represents an alphabetic character, and ‘N’ represents a numeric character). Unlike the previous code structure, these codes cannot be grouped to the first 3-characters to identify the parent organisation code and reference data is needed to do this

The new code structure introduced on 1 October 2020 has only been applied to codes that were registered from this date onwards (codes issued prior to this date will not be replaced with a new format code). A mixture of the different code formats are therefore present in HES data from 2020-21 onwards.

Last edited: 9 December 2021 6:14 pm