Official Statistics

Prison leavers in substance misuse treatment: 4-week outcomes - technical report

Published 23 April 2026

Applies to England

Introduction

This technical report describes the methodology we used to analyse outcomes for people leaving prison in England between August 2018 and December 2022. It has a specific focus on the relationship of opioid substitution treatment (OST) with:

  • mortality within 28 days of release
  • re-incarceration

The work combined administrative data from the Ministry of Justice (MOJ), the Office for National Statistics (ONS) and the Department of Health and Social Care (DHSC) using a probabilistic and deterministic linkage approach.

Deterministic linkage occurs when records from 2 or more data sets agree on a set of identifiers. For the deterministic linkage in this project, a perfect match was required on initials, sex, date of birth and area a person lived.

Probabilistic linkage gives more flexibility to identify a probable match in instances where a person’s information might have changed, for example their surname changing after marriage. It assigns a match probability for 2 records. A threshold can then be chosen to determine what counts as a match for analytical purposes.

The analysis was carried out by the Better Outcomes through Linked Data (BOLD) programme team at DHSC.

This technical report sits alongside the main statistical report and provides transparency on:

  • data governance
  • data sources
  • data linking methods
  • analytical methods
  • definitions
  • limitations

This report is intended for analysts and researchers working in prison and community substance misuse treatment.

Data governance

Data protection impact assessment

A formal data protection impact assessment was developed and jointly reviewed by data protection officers at DHSC, MOJ and ONS. It confirmed compliance with UK General Data Protection Regulation (GDPR) principles, proportionality, data minimisation, retention rules and security constraints.

Data‑sharing agreements

A cross‑government data‑sharing agreement was established and signed by senior management representatives across DHSC, MOJ and ONS. The agreement sets out the purpose of the data processing, roles and responsibilities, security requirements and retention and destruction arrangements.

Caldicott Guardian approval

Since the data was hosted by the UK Health Security Agency (UKHSA), approval for processing the data was obtained from the UKHSA Caldicott Guardian. This ensured we adhered to all 8 Caldicott Principles, consistent with standards for handling confidential health information.

People accessing specialist drug and alcohol treatment in England are asked to provide consent for their information to be shared with the National Drug Treatment Management System (NDTMS).

Around 98% of individuals in NDTMS provide consent for their treatment data to be used for service planning and performance monitoring. This satisfies DHSC’s common law duty of confidentiality and enables us to perform linkage internally. We do not share identifiable NDTMS data with other government departments. All linkage and analysis for this report were conducted exclusively by DHSC staff.

Data processing for this report met legal bases under UK GDPR Articles 6 and 9 for:

  • public interest
  • public health purposes
  • scientific and statistical research

These were supported by schedule 1 conditions 2, 3 and 4 of the Data Protection Act 2018 (health and social care, public health, research).

Confidentiality and security controls

We stored data on accredited, secure government networks. We restricted access to authorised analysts with appropriate vetting. All staff completed mandatory information governance training. We aggregated outputs to prevent identification of individuals. We removed direct identifiers after linkage.

For more information, see how DHSC processes special category data.

Data sources

MOJ: prison leavers data

The data MOJ provided to DHSC was extracted from the Prison National Offender Management Information System (p-NOMIS). The data covered all adult prisoners in England, including demographic information, offence records and dates of prison entry and exit. The data contained information on 229,923 individuals and 410,162 spells in prison in which they were released between 1 August 2018 and 13 March 2023.

ONS: mortality register

The ONS mortality register provides date, location and cause of death for all deaths registered in England. Information on all deaths registered between 1 January 2018 to 31 December 2024 was supplied to DHSC.

DHSC: community and secure setting treatment data

The NDTMS data sets used in this project recorded structured drug and alcohol treatment which started between 1 August 2018 and 31 December 2022. This included:

  • community settings - treatment interventions delivered in outpatient or non-custody settings (479,429 individuals, 896,769 interventions)
  • secure settings - treatment interventions delivered in prisons, young offender institutions and other secure establishments (124,811 individuals, 415,427 interventions)

Methodology

Overview of data linkage approach

The data linkage used Splink, an MOJ open-source library that combines deterministic and probabilistic matching. The p-NOMIS data was the main data set to which ONS mortality data and NDTMS treatment data were linked using identifiers, including:

  • initials
  • date of birth
  • sex
  • postcode (postcode sector only available for NDTMS data)
  • p-NOMIS number (available for NDTMS secure setting data only)

DHSC data scientists carried out quality assurance checks to review match rates and identify false or missed matches. They manually reviewed samples to assess and adjust the probability threshold that would identify the most positive matches, while keeping the number of false matches low.

Of the 228,923 prison leavers identified in the p-NOMIS data set, the linkage identified:

  • 80,485 (35%) people who had received drug and alcohol treatment at least once while in prison
  • 32,893 (14%) people who had received drug and alcohol treatment in the community, of which 25,476 received treatment in both prison and the community
  • 4,272 prison leavers (2%) whose death was registered before 31 December 2024, of which 2,613 had been in treatment at least once

Data cleaning

Once the individuals in the 4 data sets were matched, a random linkage ID was generated so that their activity data could be combined.

Before linking the p-NOMIS data to any other data sets, we cleaned the data to remove all records for an individual who appeared to have concurrent spells in prison. These concurrent spells may have been caused either by:

  • a duplicated record in the data, where 2 individuals shared identical personal information and were impossible to separate
  • an error in the raw data

We then:

  • removed any spells shorter than 12 hours
  • combined any spells where there was a gap of less than 18 hours between them

This cleaning removed 8,137 prison spells of under 12 hours and joined 571 prison spells with spells with gaps between of less than 18 hours.

We then linked the p-NOMIS activity data to the ONS mortality activity data and carried out further cleaning. Any link ID that reported matches where the prison leavers’ date of death did not correspond correctly to a prison stay was removed and identified as a false match. This step identified 49 individuals and removed 124 prison spells.

We then linked the data set to the NDTMS data sets, and followed a similar process to remove matches where a date of death did not correspond to a treatment start date. This step identified 2 individuals, which corresponded to 7 prison spells

We removed a further 29,854 prison spells from the data because it included people who:

  • were aged 17 and under when they left prison
  • had no date of birth data available
  • lived outside England

The NDTMS data only included treatment starting between 1 August 2018 and 31 December 2022. So, the analysis only included prison spells that:

  • started after 1 August 2018
  • were completed by 3 December 2022 (28 days before 31 December)

There were 71,095 prison spells that completed after 3 December 2022 or started before 1 August 2018, so these were excluded.

We also removed 30,711 spells because, although we knew that the person returned to prison due to available data fields, we could not determine the exact date when they returned.

The cleaned analysis data set contained information on:

  • 270,113 prison spells
  • 3,029 deaths
  • 258,085 secure setting treatments
  • 69,702 community treatments

The data set was designed so that each prison spell was treated independently. This meant that many individuals appeared more than once in the data set.

Anonymisation and data security

Our data processing was strictly controlled by the measures stipulated by the Caldicott Guardian, MOJ and DHSC. Approval to use this data was only given subject to these measures.

All data sets were split so that identifiable data was separated from the activity data. This meant that once the data sets were linked, the identifiable data was no longer needed for the analysis and was deleted.

Different team members completed the linkage with identifiable information from those who did the analysis. No individual analyst was permitted to see both the identifiable and activity data at the same time. This meant that it was not possible to link any activity data back to an individual’s identifiable data in the linked data set.

Following data linkage, all personally identifiable information was destroyed in line with the data sharing agreements.

Bias analysis

We undertook bias analysis to assess whether the process of linking records introduced differences between people whose data was linked and those whose data was not. Specifically, we examined demographics and clinical characteristics, including:

  • sex
  • age
  • ethnicity
  • injecting status
  • substance group

We compared proportions across these groups and carried out further sensitivity checks when we detected differences. The result showed that adjustment for bias had no significant effect, indicating that linkage bias did not significantly alter overall findings.

Fine-Gray competing risks model

We chose the Fine-Gray competing risks model as the method for analysis. This is because the model considers competing risks as well as the effect of other characteristics on the main outcomes of analysis, which was re-incarceration, death or drug-related death.

If a person returns to prison within 28 days, any death will not be linked to the previous prison spell but would then be linked to their next prison spell. So, the method for calculating risk ratios needed to account for this. This is why we could not use the Keplin-Meier survival model, as we may have done in similar analyses.

The cumulative incidence function curves in the report are approximate illustrations of the difference in relative risk. They consider the competing risks but do not adjust for the impact of the other characteristics. However, the sub-distribution hazard ratios (SHR), calculated using the Fine-Gray model, do adjust for the following characteristics:

  • age at prison exit (grouped)
  • OST exposure on final day in prison
  • injecting status
  • prison release day
  • prison release year
  • sex
  • engagement with community treatment within 7 days
  • ethnicity
  • offence groups

Definitions of characteristics

Demographics

All age, sex and ethnicity information used in the report was sourced from the p-NOMIS data set. Where there were multiple values recorded for the same individual, we used the most common value. Where it was impossible to determine a single most common value, we removed those records.

Offence group

We categorised offences into 12 offence groups, as used in criminal justice official statistics. Each offence group was treated independently, so that a single prison spell could have multiple offence groups matched to it. Due to the way in which the data was recorded, multiple prison spells could also be linked to the same offence, for example if the person was recalled to prison.

Substance group

Many people experience difficulties with drugs and alcohol and receive treatment for both. While these people often share many similarities, they also have clear differences, so this report divides adults in secure setting treatment into 4 substance groups:

  • opiate - people who are dependent on or have problems with opiates, mainly heroin
  • non-opiate only - people who have problems with non-opiate drugs, such as cannabis, crack and ecstasy, but do not have problems with opiates
  • non-opiate and alcohol - people who have problems with both non-opiate drugs and alcohol, but do not have problems with opiates
  • alcohol only - people who have problems with alcohol but do not have problems with any other substances

If a person reports a problem with opiates at any point during a prison spell, the entire prison spell is recorded as being in the ‘opiate’ group.

Community treatment engagement within 7 days

There are instances where a person was in prison for a short period and had started community treatment before prison and then re-engaged with treatment within 3 weeks of their last appointment. In these cases, the treatment record would not indicate a break in treatment, so the date which they engaged with treatment after leaving prison is not available. These cases were also classified as community treatment engagement within 7 days.

This metric is not the same as the ‘continuity of care’ metric used in other drug and alcohol treatment statistics.

Injecting status

Injecting status was classified as either ‘has ever injected’ or ‘has never injected’ . Data for injecting status was taken from a question in NDTMS with 3 possible answers:

  • currently injecting
  • previously injected
  • never injected

If a person had ever reported they were currently injecting or had previously injected during any treatment within a prison spell, that prison spell was classified as ‘has ever injected’.

OST exposure definition

We wanted to replicate previous studies on opioid substitution treatments as closely as possible, so the definition we used for ‘OST exposure’ was as follows.

A secure setting drug and alcohol treatment which is one of:

  • opioid maintenance (buprenorphine or methadone) - a treatment for chronic opiate users to engage them in treatment on release, where it is considered necessary (based on a full clinical assessment) to protect them from the risks of opiate overdose
  • opioid reduction (buprenorphine or methadone) - a treatment used where the person is receiving substitute opioid prescribing and their care plan objective is reduction with a commitment to becoming drug-free

The intervention must also have a treatment end date (as recorded in NDTMS data) that is equal to the prison end date (as recorded in the p-NOMIS data).

This definition excluded anyone who had OST during their prison spell, but not on the final day in prison.

We excluded treatments using buprenorphine depot injection (a long-acting, slow-release medication, for example Buvidal) from the analysis due to small sample numbers.

Outcome definitions

Death within 28 days of prison release

For some people, the date of death was the same as their prison release date, but the available data did not suggest they died in prison. For the Fine-Gray competing risks model (see the ‘Analytical methods’ section below), the number of days between release and death was recoded as 0.5 days. This was done because any 0 values in a Fine-Gray model cause calculation errors.

Re-incarceration within 28 days of prison release

For some people, we knew they had returned to prison, but their next start date was not available in the data. These prison spells were removed from the analysis.

The figures in this report are based on the current National Statistics definition of deaths related to drug poisoning. This definition includes:

  • accidents, suicides and assaults involving drug poisoning
  • deaths from drug abuse and drug dependence

It does not include other adverse effects of drugs (for example, anaphylactic shock or transport accidents where the driver was under the influence of drugs).

Also, a small number of deaths from assaults involving drugs are excluded because ONS does not have full information on the death until criminal proceedings are completed. In these cases, because someone is being prosecuted in relation to the death, the coroner adjourns the inquest and registers the death using an ‘accelerated registration’.

Drug poisoning deaths involve a wide range of substances, including legal and illegal drugs, prescription drugs (either prescribed to the deceased person or obtained by other means) and over-the-counter medications.

Some deaths result from complications of drug abuse rather than an acute drug overdose (such as deep vein thrombosis or septicaemia resulting from intravenous drug use, or heart disease from chronic cocaine use). These deaths are generally coded as a mental and behavioural disorder due to drug use, not as drug poisoning deaths.

Table 1: International Classification of Diseases 10th Revision (ICD-10) codes used to define deaths related to drug poisoning

Description ICD-10 codes
Mental and behavioural disorders due to drug use (excluding alcohol and tobacco) F11 to F16 , F18 to F19
Accidental poisoning by drugs, medicaments and biological substances X40 to X44
Intentional self-poisoning by drugs, medicaments and biological substances X60 to X64
Assault by drugs, medicaments and biological substances X85
Poisoning by drugs, medicaments and biological substances, undetermined intent Y10 to Y14

Limitations

Data linkage limitations

Linking p-NOMIS, NDTMS and the ONS mortality register for the first time introduces some inherent limitations. ONS mortality data and p-NOMIS did not use a shared unique identifier. Early rounds of linkage identified incorrect matches, which we removed during manual review. Also, linkage to NDTMS community treatment data is likely to underestimate community treatment episodes, as community records use weaker identifiers compared with secure setting treatment records.

Definition of OST exposure

We defined OST exposure as receiving methadone or buprenorphine on the day of release. This definition excludes people who may have been prescribed OST earlier in custody or received Buvidal, for which the dosing schedule makes day-of-release confirmation difficult. As a result, the analysis may underestimate the broader impact of OST provided during imprisonment.

Prison release follow-up period

The analysis is restricted to the first 28 days after release, the period of highest mortality risk. While this is appropriate for assessing acute harms, it does not cover medium-term or long-term outcomes, such as mortality beyond the first month or re-engagement with community treatment.

Group restrictions and timeline effects

As the NDTMS treatment data we analysed begins in August 2018, the group includes only people whose prison spells started on or after that date. This excludes longer spells that began earlier and creates a bias towards shorter spells.

Unmeasured differences

Although the Fine-Gray competing risks model adjusts for several observed characteristics, unmeasured differences between individuals may still influence outcomes. We did not account for factors such as other health issues, patterns of drug use and operational differences between prisons because data was not available.

Implications for interpretation

The analysis identifies an association between a range of characteristics and mortality and re-incarceration within the first 28 days. However, this should not be interpreted as evidence of a causal effect.

Contact details and feedback

You can send any enquiries and feedback on these statistics to statistics@dhsc.gov.uk.