Anxiety Disorders

PH3282 / 8275

OpenSAFELY

Jan 26, 2026

REGISTERING DOI...

OpenCodelists Phenotype
  1. Overview

    Codelist ID
    opensafely/anxiety-disorders
    Version ID
    6aef605a
    Coding System
    SNOMED CT 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.

    Codes that indicate the presence of an anxiety disorder.

    © 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

    A list of possible codes was generated by searching the SNOMED-CT vocabulary for the keywords 'anxiety' and 'anxious'.

    The resultant list of codes was then examined and filtered out by two people, to remove those which did not definitively relate to a diagnosis of anxiety disorder.

    The following borderline cases were notable:

    -Specific phobias e.g. 'Fear of bridges' were excluded. These were felt to be transient forms of anxiety only occurring in specific situations which may be entirely avoidable and/or not debilitating.

    -Codes in the group 'Phobic Disorders' such as 'Social Phobia', were included as these represent more generalised problems that are likely to cause anxiety.

    -Several codes relating to 'Anxiety about... X', e.g. 'Anxiety about choking' were included. Although these codes are highly specific and may relate to transient situations, it was felt clinicians may use them as a way of coding an anxiety disorder whilst also elaborating of specific details.

    -Administration of tests for anxiety were excluded, as these may detect no anxiety.

    -'Anxious character' was excluded as it was felt this refers to the presence of particular personality traits (e.g. neuroticism), but not necessarily the presence of anxiety.

    For more detail on logic applied see discussion in GitHub issue.

  4. References

  5. Clinical Codelist

  6. API

    To Export Phenotype Details:

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

    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(
     'PH3282',
     version_id=8275
    )

    To Export Phenotype Code List:

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

    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(
     'PH3282',
     version_id=8275
    )

  7. Version History

    Version IDNameOwnerPublish date
    Anxiety Disorders ieuan.scanlon2026-01-26 23:09