ICD-10 Concept search

Synopsis

This page contains queries that uses the Snomed ICD-10 ontology to return ICD-10 coded entities extracted from the FINDINGS and IMPRESSIONS sections of Radiology reports.

This page contains two queries:

  • The first query finds ICD-10 mapped entities and returns the ICD-10 code and corresponding Snomed description.
  • The second query extends the first by also retrieving the Snomed concept ID and fully-qualified concept description. This is possible because the NLP API performs post-coordination of entities after data extraction. Moreover, the NLP API uses the ICD-10 mapping from Snomed CT ensuring that every ICD-10 mapped entity is also mapped to a Snomed concept ID.

Processing Requirements

This query assumes that at least the following processing options were enabled:

  • --feature snomed-ontology, snomedicd10-ontology
  • --store-sections-and-sentences

For this query, Radiology imaging studies were processed with the following document type:

  • --category Radiology
  • --subcategory CT

Clinical Context

The World Health Organization’s (WHO) International Statistical Classification of Diseases and Related Health Problems (ICD) 10th revision (ICD-10) is a widely used medical coding system, used for billing and data structuring purposes world-wide. Unfortunately, while its textual description of concepts is highly specific (e.g. Injury, poisoning and certain other consequences of external causes), many clinicians would not use such long and highly specific descriptions in their clinical notes.

The NLP API uses the SNOMED-to-ICD-10 mappings provided in the SNOMED ontology to map commonly-used clinical terms to ICD-10 concepts. The query below is an example of how these highly useful ICD-10 concepts can be extracted from medical text that uses common, colloquial medical language. In addition, the NLP API provides the SNOMED-to-ICD-10 mapping guidance that can be used to further refine the coding via manual methods.

SQL query

Query 1: Find ICD-10 coded entities

SELECT c.concept_id, d.category, fe.section_name, fe.text, fe.polarity, fe.uncertainty, c.description, sen_l.text
FROM foundentity fe
JOIN foundentityconcept fec ON fe.id = fec.found_entity_id
JOIN concept c ON fec.concept_id = c.concept_id AND fec.concept_ontology = c.ontology
JOIN foundentitylocation fel ON fe.id = fel.found_entity_id
JOIN location l ON fel.location_id = l.id AND l.type_ = 'sentence'
JOIN sentencelocation sen_l ON sen_l.id = l.location_id
JOIN document d ON l.document_id = d.id
WHERE c.ontology = 'snomed_icd10' --!! Replace with ontology of choice e.g. snomed, umls, radlex, loinc
AND d.category = 'Radiology'
AND fe.section_name IN ('FINDINGS', 'IMPRESSION');
concept_idcategorysection_nametextpolarityuncertaintydescription
A09.9RadiologyFINDINGSenteritisassertedcertainInfectious gastroenteritis and colitis, unspecified (Disease or Syndrome)
A09.9RadiologyIMPRESSIONenteritisassertedcertainInfectious gastroenteritis and colitis, unspecified (Disease or Syndrome)
C43.9RadiologyIMPRESSIONmetastatic malignant melanomaassertedcertainMalignant melanoma of skin, unspecified (Neoplastic Process)
C50.9RadiologyIMPRESSIONbreast cancerassertedcertainMalignant neoplasm of breast of unspecified site (Neoplastic Process)
C79.9RadiologyIMPRESSIONmetastatic malignant melanomaassertedcertainSecondary malignant neoplasm of unspecified site (Neoplastic Process)
C79.9RadiologyIMPRESSIONmetastasesnegateduncertainSecondary malignant neoplasm of unspecified site (Neoplastic Process)
C79.9RadiologyIMPRESSIONmetastasesnegatedcertainSecondary malignant neoplasm of unspecified site (Neoplastic Process)
C80.9RadiologyIMPRESSIONmalignancynegateduncertainMalignant neoplasm without specification of site (Neoplastic Process)
D16.9RadiologyFINDINGSenchondromaasserteduncertainBenign neoplasm of bone and articular cartilage, unspecified (Neoplastic Process)
D16.9RadiologyIMPRESSIONenchondromaasserteduncertainBenign neoplasm of bone and articular cartilage, unspecified (Neoplastic Process)

Query 2: ICD-10 coded entities and corresponding Snomed concepts

-- Find ICD10 Code and corresponding SNOMED CT fully-specified concept name
WITH icd10_mapped_entities AS (
SELECT fe.id, c.concept_id, c.description, fe.polarity, fe.uncertainty, fe.text
FROM foundentity fe
JOIN foundentityconcept fec on fe.id = fec.found_entity_id
JOIN concept c on c.concept_id = fec.concept_id and c.ontology = fec.concept_ontology AND
c.ontology = 'snomed_icd10'),
snomed_mapped_entities AS (
SELECT fe.id, c.concept_id, c.description, fe.polarity, fe.uncertainty, fe.text
FROM foundentity fe
JOIN foundentityconcept fec on fe.id = fec.found_entity_id
JOIN concept c on c.concept_id = fec.concept_id and c.ontology = fec.concept_ontology AND
c.ontology = 'snomed')
SELECT icd10_mapped_entities.id as entityId,
icd10_mapped_entities.concept_id as icd10_id,
icd10_mapped_entities.description as icd10,
snomed_mapped_entities.concept_id as sct_id,
snomed_mapped_entities.description as snomed,
fe.polarity,
fe.uncertainty,
fe.section_name,
fe.text as term,
sl.text as sentence
FROM icd10_mapped_entities
JOIN snomed_mapped_entities ON icd10_mapped_entities.id = snomed_mapped_entities.id
JOIN foundentity fe ON fe.id = icd10_mapped_entities.id
JOIN foundentitylocation fel on fe.id = fel.found_entity_id
JOIN location l on fel.location_id = l.id AND l.type_ = 'sentence'
JOIN document d ON l.document_id = d.id
JOIN sentencelocation sl on sl.id = l.location_id AND l.type_ = 'sentence'
WHERE fe.polarity = 'asserted'
AND fe.uncertainty = 'certain'
AND d.category = 'Radiology'
AND fe.section_name IN ('FINDINGS', 'IMPRESSION');
entityidicd10_idicd10sct_idsnomedpolarityuncertaintysection_nameterm
611K42.9Umbilical hernia without obstruction or gangrene (Acquired Abnormality)396347007Umbilical hernia (disorder)assertedcertainFINDINGSumbilical hernia
614A09.9Infectious gastroenteritis and colitis, unspecified (Disease or Syndrome)64613007Inflammation of small intestine (disorder)assertedcertainFINDINGSenteritis
634A09.9Infectious gastroenteritis and colitis, unspecified (Disease or Syndrome)64613007Inflammation of small intestine (disorder)assertedcertainIMPRESSIONenteritis
636K42.9Umbilical hernia without obstruction or gangrene (Acquired Abnormality)396347007Umbilical hernia (disorder)assertedcertainIMPRESSIONumbilical hernia
643K62.9Disease of anus and rectum, unspecified (Disease or Syndrome)300312006Lesion of rectum (disorder)assertedcertainFINDINGSrectal wall thickening
646L90.5Scar conditions and fibrosis of skin (Acquired Abnormality)275322007Scar (disorder)assertedcertainFINDINGSScarring
650M47.99Spondylosis, unspecified (Disease or Syndrome)8847002Spondylosis (disorder)assertedcertainFINDINGSMultilevel degenerative changes
651K76.0Fatty (change of) liver, not elsewhere classified (Disease or Syndrome)197321007Steatosis of liver (disorder)assertedcertainIMPRESSIONFatty liver
746K76.0Fatty (change of) liver, not elsewhere classified (Disease or Syndrome)197321007Steatosis of liver (disorder)assertedcertainFINDINGShepatic fatty infiltration
749I70.0Atherosclerosis of aorta (Disease or Syndrome)81817003Atherosclerosis of aorta (disorder)assertedcertainFINDINGSaorta atherosclerosis

Next steps

This query pattern is applicable to other report types and sections. You may also want to filter the dataset returned limiting it to just those terms which were experienced by the patient by using the experiencer relation. An example of this query pattern is provided here.