Diabetes

PH4062 / 9273

Chalmers, F, Young K, Walker E, Chilala C, Coombe A, Shields B, Preiss D, Cezard G, MacArthur J, Dennis J, Valabhji J, Kaptoge S, Khunti K, Mafham M, Rutter MK, Lessels S, Shi W, Wild S, Eastwood S, Denaxas S, Bolton T, Thomas N, Pearson E

Apr 23, 2026

BHF Data Science Centre Phenotype
  1. Overview

    Project Name
    Diabetes Data Science Catalyst
    Phenotype Type
    Disease or syndrome
    Sex
    Both
    Valid Event Date Range
    No data
    Coding System
    SNOMED CT codesBNF codesICD10 codes
    Ontology
    No data
    Collections
    BHF Data Science Centre
    Tags
    No data
  2. Definition

    Definition

    This phenotype is a rule-based diabetes phenotyping algorithm designed for use in electronic health records (EHR) to identify people with diabetes, define diabetes type, and determine date of diagnosis from routinely collected health data. It is intended to improve the quality, consistency, transparency, and comparability of diabetes research using EHRs. The algorithm has been developed iteratively, and multiple versions are available to reflect updates and refinements over time.

    The algorithm was developed by the Diabetes Data Science Catalyst (DDSC), a collaboration between the BHF Data Science Centre, Diabetes UK, and HDR UK.

    Further details of the algorithm are available through the public DDSC diabetes phenotype app.

    Clinical Trials

    No Trials

    Endorsements

    No endorsement
  3. Implementation

    Implementation

    This phenotype is implemented as a rule-based algorithm for application to electronic health records, using structured logic applied to diagnosis, prescribing, and laboratory data to identify diabetes status, define diabetes type, and derive date of diagnosis. The implementation is coded in PySpark and R and is publicly available through the BHF Data Science Centre GitHub, with supporting methodological documentation provided through the associated public application.

    DDSC algorithm flow chart

  4. Clinical Codelist

  5. Publication

    Related publications

    No known publications

    Citation Example

    Chalmers, F, Young K, Walker E, Chilala C, Coombe A, Shields B, Preiss D, Cezard G, MacArthur J, Dennis J, Valabhji J, Kaptoge S, Khunti K, Mafham M, Rutter MK, Lessels S, Shi W, Wild S, Eastwood S, Denaxas S, Bolton T, Thomas N, Pearson E. PH4062 / 9273 - Diabetes. Phenotype Library [Online]. 23 April 2026. Available from: http://phenotypes.healthdatagateway.org/phenotypes/PH4062/version/9273/detail/. [Accessed 24 April 2026]

  6. API

    To Export Phenotype Details:

    FormatAPI
    JSON site_root/api/v1/phenotypes/PH4062/version/9273/detail/?format=json
    R Package

    # Download here

    library(ConceptLibraryClient)


    # Connect to API

    client = ConceptLibraryClient::Connection$new(public=TRUE)


    # Get details of Phenotype

    phenotype_details = client$phenotypes$get_detail(
     'PH4062',
     version_id=9273
    )

    Py Package

    # Download here

    from pyconceptlibraryclient import Client


    # Connect to API

    client = Client(public=True)


    # Get details of Phenotype

    phenotype_detail = client.phenotypes.get_detail(
     'PH4062',
     version_id=9273
    )

    To Export Phenotype Code List:

    FormatAPI
    JSON site_root/api/v1/phenotypes/PH4062/version/9273/export/codes/?format=json
    R Package

    # Download here

    library(ConceptLibraryClient)


    # Connect to API

    client = ConceptLibraryClient::Connection$new(public=TRUE)


    # Get codelist of Phenotype

    phenotype_codelist = client$phenotypes$get_codelist(
     'PH4062',
     version_id=9273
    )

    Py Package

    # Download here

    from pyconceptlibraryclient import Client


    # Connect to API

    client = Client(public=True)


    # Get codelist of Phenotype

    phenotype_codelist = client.phenotypes.get_codelist(
     'PH4062',
     version_id=9273
    )

  7. Version History

    Version IDNameOwnerPublish date
    Diabetes fchalmers2026-04-23 16:20