Borderline Personality Disorder

Michael Doyle, David While, Pearl L H Mok, Kirsten Windfuhr, Darren M Aschroft, Evangelos Kontopantelis, Carolyn A Chew-Graham, Louis Appleby, Jenny Shaw, Roger T Webb

Version ID
Disease or Syndrome
Data Sources
Valid event data range
01/01/2002 - 31/12/2011
♀  Female ♂  Male
Agreement Date
Coding system
Read codes v2
ClinicalCodes Repository Phenotype Library
No tags


In the UK, over 98 % of the population are registered with a general practice, with the clinical team providing primary care and access to most other services from the National Health Service (NHS). Even where the patient leaves a family practice and joins another, their GP record follows them, providing a continuous care record. Our data source was the UK Clinical Practice Research Datalink (CPRD), which is one of the largest population-based, longitudinal, primary care databases in the world ( The CPRD has provided anonymised primary care records for public health and epidemiological research since 1987. It was initially established in London as the Value Added Medical Products (VAMP) ‘research bank’, which expanded across the UK to become the General Practice Research Database (GPRD) in 1993, and was developed further as the CPRD in 2012. It came into being because of a need to develop good quality IT computer systems for general practices in an era when most practices were still wholly reliant on paper records. All practices in the CPRD use Vision software rather than other general practice computing systems, and have consented to share anonymous data for academic research purposes. Around 7 % of the UK population is now represented in the CPRD. Although practices were not selected according to any scientific sampling strategy, a fortuitous by-product of the largely ad hoc processes via which practices have contributed data to the Datalink is that it is broadly representative of the UK primary care patient population by basic demographics such as age, gender and ethnicity. All consultations for registered patients in participating practices are recorded in the CPRD, with comprehensive and detailed clinical coding - the ‘Read’ codes - for symptoms, diagnoses, treatment (including prescribed medication), and referral to other forms of NHS care and to other health care providers. The September 2010 version of the CPRD we analysed contained approximately 10.6 million complete patient records. Before our study dataset was created, the Independent Scientific Advisory Committee of the CPRD granted approval. Consent from individual patients is not required to conduct CPRD-based studies.

To our knowledge there have been no published validation studies of personality disorder or alcohol misuse diagnoses in the CPRD. However, two systematic reviews have reported overall high levels of diagnostic validity in the CPRD and good levels of agreement with other routinely collected data sources. A generic limitation of the CPRD is that diagnostic behaviour varies considerably between GPs and between general practices. Different doctors may apply varying clinical Read codes for exactly the same condition, whilst some may enter free-text information instead of clinical coding. The Quality and Outcomes Framework was introduced in 2004, and recent evidence indicates that this national quality of care incentivisation initiative has produced a marked improvement in diagnostic accuracy and completeness for some chronic conditions during recent years in the CPRD.

The potential of this data source has been further enhanced by recent implementation of linkage to national mortality records. In 2008, complete prospective and historic linkage to national mortality registration data was implemented via the Office for National Statistics (ONS). Data linkage between CPRD and ONS is only available for English practices that have consented to participate in the linkage scheme. These linkages cover approximately 75 % of the contributing CPRD practices in England; the equivalent procedure has not yet been implemented for CPRD practices in the other UK nations: Scotland, Wales and Northern Ireland. Therefore, our case-control study was nested within a subset of the whole CPRD. We included adult suicides if the individual died between January 1st 2002 and December 31st 2011, and had at least a complete year of “up-to-standard” CPRD clinical data prior to the individual’s index-date (death). This quality criterion was also applied in selecting the matched living controls.

Suicide case definition:

In the UK, most unnatural deaths of undetermined cause (or ‘open verdicts’) among adults are considered likely to be suicides. To reduce false-negative misclassification, and in line with standard practice for conducting epidemiological studies of suicide in the UK, our case definition included these open verdicts. The following ICD-10 codes were used: X60-84, Y10-Y34 (excluding Y33.9; ie deaths with adjourned inquests that are mostly deemed subsequently to be homicides), Y87.0 and Y87.2. Identifying PD, other mental disorders and comorbid alcohol misuse To delineate diagnoses of PD we searched the textual descriptions of the clinical Read codes for terms that included: ‘personality’, ‘psychopath’ or ‘sociopath’. We examined the relevant Read codes descriptors and reached a general consensus that we would define patients as having a PD if they had a diagnosis that included a substring of either ‘personality disorder’ or ‘psychopathic disorder’ to ensure that we had a clinically relevant sample with a PD diagnosis. We then identified an additional subgroup of ‘borderline PD: diagnosis of borderline or unstable personality disorder’. We also constructed two additional medical definitions to identify patients with: (1) Any diagnosed mental health disorder: all Read codes beginning with the letter ‘E’, ie a diagnosis of ‘Mental Disorders’ (please note that we excluded those patients coded for signs and symptoms of mental illness only but without an ‘E…’ diagnostic code); (2) Comorbid alcohol misuse: all code descriptions containing “alcohol” were extracted. Two senior clinicians (co-author and consultant psychiatrist: JS; first author and forensic mental health nurse consultant: MD) then independently identified and agreed a list of codes that indicated alcohol problems using a RAG (Red/Amber/Green) agreement system, where Red was defined as a definite clinically significant alcohol misuse problem; Amber, possible problem and Green no problem. Independent ratings were reviewed and a consensus on Red, definite clinically significant alcohol misuse, was established. We opted not to investigate co-morbid PD and illicit drug use due to suspected classification issues, and because the number of suicide cases with such comorbidity was expected to be very small in the CPRD. The diagnoses of PD, any mental health disorder and the alcohol misuse definition are defined as ‘lifetime’ definitions in the sense that they are recorded at some point in their CPRD GP clinical records. The codes contained in the Read ‘E’ category cover every type of diagnosable mental illness across the full spectrum of psychopathology, irrespective of levels of severity and chronicity. In their meta-analysis of suicide risk in persons with a mental disorder, Harris and Barraclough reported that virtually all mental disorders, except for intellectual disability and dementia, are associated with an increased risk of suicide. We therefore combined all categories of mental illness other than personality disorders and analysed them together as a single category.

In the UK, general practitioners typically diagnose and treat less severe disorders such as depression, anxiety and stress, whereas more series conditions such as psychotic disorders and PDs will be mostly treated by psychiatrists in inpatient or outpatient facilities. The great majority of persons with a diagnosed mental disorder in the study dataset were diagnosed with depression and/or anxiety disorders, and this applied to people who died by suicide as well as the living control patients. Mental illness diagnoses, whether made by a GP or by a psychiatrist, are entered into the patient’s primary care clinical record and are therefore recorded in the CPRD.


  • Michael Doyle, David While, Pearl L H Mok, Kirsten Windfuhr, Darren M. Ashcroft, Evangelos Kontopantelis, Carolyn A Chew-Graham, Lous Appleby, Jenny Shaw, Roger T Webb, Suicide risk in primary care patients diagnosed with a personality disorder a nested case control study. BMC Family Practice, 17(106), 2016.

Clinical Code List

Rows: 3
Code Description Entity type Category Coding System (Read)
E21y200 borderline personality disorder res32: Borderline Personality Disorder diagnostic Read
Eu60300 [x]emotionally unstable personality disorder res32: Borderline Personality Disorder diagnostic Read
Eu60312 [x]borderline personality disorder res32: Borderline Personality Disorder diagnostic Read


To Export Phenotype Details:

Format API
XML site_root/api/v1/public/phenotypes/PH443/version/886/detail/?format=xml
JSON site_root/api/v1/public/phenotypes/PH443/version/886/detail/?format=json
R Package

# Download here


# Connect to API

client = connect_to_API(public=TRUE)

# Get details of phenotype

details = get_phenotype_detail_by_version('PH443', '886', api_client=client)

To Export Phenotype Code List:

Format API
XML site_root/api/v1/public/phenotypes/PH443/version/886/export/codes/?format=xml
JSON site_root/api/v1/public/phenotypes/PH443/version/886/export/codes/?format=json
CSV site_root/phenotypes/PH443/version/886/export/codes/
R Package

# Download here


# Connect to API

client = connect_to_API(public=TRUE)

# Get codelists of phenotype

codelists = get_phenotype_code_list('PH443', '886', api_client=client)

Version History

Name Owner Publish date
886 Borderline Personality Disorder ieuan.scanlon 2021-10-06 currently shown

Export - export all codes into a csv file/JSON/XML for the current phenotype version.

Print - Print page.