Tricyclic and related antidepressants DM&D

PH3788 / 8939

OpenSAFELY

Jan 26, 2026

REGISTERING DOI...

OpenCodelists Phenotype
  1. Overview

    Codelist ID
    opensafely/tricyclic-and-related-antidepressants-dmd
    Version ID
    1268eae1
    Coding System
    dm+d codes
    Collections
    OpenCodelistPhenotype Library
    Tags
    No data
  2. Definition

    This codelist was taken from OpenCodelists, created by OpenSAFELY. We recommend viewing this Phenotype on the OpenCodelist website to view the most recent version.

    This code list contains codes from the NHS dictionary of medicines and devices (dm+d) that are known as Tricyclic Antidepressants. All formulations of these medicines have been included, except for those that are presented in a combined formulation with other drugs. All tricyclic antidepressants are licensed for the treatment of depression and some of them are licensed for the treatment of anxiety disorders. Certain tricyclic antidepressants are licensed for unusual psychiatric conditions e.g. clomipramine for cataplexy associated with narcolepsy. Some are also licensed for non-psychiatric indications, including migraine, neuropathic pain, headache.

    © University of Oxford for the Bennett Institute for Applied Data Science 2025. This work may be copied freely for non-commercial research and study.

  3. Methodology

    All BNF codes that begin with 040301 were included (defined as Tricyclic antidepressants) except for Mianserin and Trazodone. These latter two antidepressants were excluded due to having different chemical structures and pharmacology to other tricyclics. See github discussion for more details. These BNF codes were then mapped to dm+d using OpenPrescribing methodology.

    For some studies it may be necessary to include other antidepressant codelists.

  4. References

  5. Clinical Codelist

  6. API

    To Export Phenotype Details:

    FormatAPI
    JSON site_root/api/v1/phenotypes/PH3788/version/8939/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(
     'PH3788',
     version_id=8939
    )

    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(
     'PH3788',
     version_id=8939
    )

    To Export Phenotype Code List:

    FormatAPI
    JSON site_root/api/v1/phenotypes/PH3788/version/8939/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(
     'PH3788',
     version_id=8939
    )

    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(
     'PH3788',
     version_id=8939
    )

  7. Version History

    Version IDNameOwnerPublish date
    Tricyclic and related antidepressants DM&D ieuan.scanlon2026-01-26 23:34