11.13. SNOMED CT coding

11.13.1. Overview

SNOMED CT (Systematized Nomenclature of Medicine Clinical Terms) is a structured computer-oriented vocabulary for medicine. It is owned by IHTSDO, who trade as SNOMED International.

It is the standard computerized vocabulary for the UK NHS.

CamCOPS supports SNOMED CT coding for:

For example, the XML representation of a PHQ-9 task might include output like this:

<snomed_ct_codes>
    <snomed_ct_expression xsi:type="string">
        715252007 |Depression screening using Patient Health Questionnaire Nine Item score (procedure)|
    </snomed_ct_expression>
    <snomed_ct_expression xsi:type="string">
        758711000000105 |Patient health questionnaire 9 (assessment scale)| : 720433000 |Patient Health Questionnaire Nine Item score (observable entity)| = #1
    </snomed_ct_expression>
    <snomed_ct_expression xsi:type="string">
        112011000119102 |Negative screening for depression on Patient Health Questionnaire 9 (finding)|
    </snomed_ct_expression>
</snomed_ct_codes>

11.13.2. Licensing

SNOMED CT is owned by the IHTSDO but is free to use within the UK, subject to registration; see https://digital.nhs.uk/services/terminology-and-classifications/snomed-ct. The licensing agreement from https://termbrowser.nhs.uk/ is reproduced here but the original should always be checked. It may not be free elsewhere.

It is not permitted to distribute SNOMED CT generally; users must accept the license terms and obtain the SNOMED CT identifiers separately. CamCOPS does not contain SNOMED CT identifiers (it uses arbitrary strings to reference them).

11.13.3. Adding SNOMED CT support to CamCOPS

If you are permitted (see “Licensing” above), find a SNOMED CT REST API server (e.g. from your national provider) and ask it for relevant SNOMED CT identifiers using the camcops_fetch_snomed_codes tool, creating camcops_tasks_snomed.xml.

This file can then be plugged into the following parameter of the server configuration file:

SNOMED_TASK_XML_FILENAME = /some_path/camcops_snomed_ct_codes/camcops_tasks_snomed.xml

11.13.4. Adding SNOMED CT support for ICD-9-CM and ICD-10 to CamCOPS

This requires additional data.

There are a few maps from ICD to SNOMED available, including:

CamCOPS supports the Athena OHDSI (pronounced “odyssey”) datasets. Use it as follows.

  • Visit http://athena.ohdsi.org.

  • Register and log in.

  • “Download”

  • Untick everything, then tick:

    • ICD9CM

    • ICD9Proc

    • ICD10

  • “Download vocabularies”

  • Unzip the result.

You will find files including CONCEPT.csv and CONCEPT_RELATIONSHIP.csv. (Despite their names, they are tab-separated-value [TSV] files, not comma-separated-value [CSV] files.)

Since some of these files are quite large (e.g. ~10 million rows), CamCOPS preprocesses them into smaller XML files covering the codes it cares about. Convert with a script like this:

#!/usr/bin/env bash

ATHENA_ROOT=/some_path/Athena/unzipped
CAMCOPS_SNOMED_DIR=/some_path/camcops_snomed_ct_codes

camcops_server convert_athena_icd_snomed_to_xml \
    --athena_concept_tsv_filename ${ATHENA_ROOT}/CONCEPT.csv \
    --athena_concept_relationship_tsv_filename ${ATHENA_ROOT}/CONCEPT_RELATIONSHIP.csv \
    --icd9_xml_filename ${CAMCOPS_SNOMED_DIR}/icd9_snomed.xml \
    --icd10_xml_filename ${CAMCOPS_SNOMED_DIR}/icd10_snomed.xml

This will make two XML files. They can now be plugged into the following parameters of the server configuration file:

SNOMED_ICD9_XML_FILENAME = /some_path/camcops_snomed_ct_codes/icd9_snomed.xml
SNOMED_ICD10_XML_FILENAME = /some_path/camcops_snomed_ct_codes/icd10_snomed.xml

Note

Not every ICD-9-CM or ICD-10 code has SNOMED CT equivalents (at least in the Athena OHDSI data of Dec 2018). Some have more than one code (of which CamCOPS will return all).