11.12. SNOMED CT coding

11.12.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.12.2. Licensing

SNOMED CT is owned by the IHTSDO but is free to use within the UK; see https://digital.nhs.uk/services/terminology-and-classifications/snomed-ct.

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

11.12.3. Adding SNOMED CT support for CamCOPS

If you are permitted, agree to the license terms and download camcops_tasks_snomed.xml.

Todo

describe how to get camcops_tasks_snomed.xml

It can now 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.12.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).