Find Entities Extracted from Embedded Reports

Synopsis

CCDs may contain various types of whole reports embedded within comments areas or in narrative sections. These may be reports for various procedures and diagnostic tests. Hence it is not uncommon to find radiological, pathology and surgical reports included in CCDs. This query shows how to retrieve SNOMED disorder, finding or morphologic abnormalities from these embedded reports.

Processing Requirements

For this query, Continuity of Care Documents were processed. See processing requirements Processing Requirements.

Background

C-CDA standards provides document-level templates for various types of Clinical Notes. These document templates define the structure of a conforming CDA documents. They specify the required and optional section-level templates for each document type. For example, CCD (Continuity of Care Documents), must have these sections: History of Present Illness, Problem, and Allergies & Intolerances sections and may optionally include many other sections such as Assessment, Chief Complaint, Family History and so on. Note that within the sections, the authoring software may include whole reports for various procedures performed such as: imaging studies, and surgical procedures. These reports have within them inherent structure containing subsections such as Findings, Impressions, and Recommendations, for example. These reports are of particular relevance for NLP-based data extraction because they are typically rich sources of narrative text.

This query will make use of how the NLP API handles section headings when it processess C-CDA documents. An indepth discussion is documented here. Here are the key points:

  • NLP API client identifies the C-CDA defined sections using the XML coded information (Sections OID).
  • It normalizes those the section names.
  • NLP API will append SECTION to all normalized C-CDA section names; for example, Problem becomes PROBLEM SECTION.
  • NLP API appends SUBSECTION to the names of native C-CDA sub-sections; for example a sub-section of RESULTS becomes ... SUBSECTION.
  • But, the NLP API does not rename the section headings inside an embedded report — a radiology report embedded in a RESULTS section keeps its own headings, such as FINDINGS or IMPRESSION.
  • NLP API extracts and retains section hierarchy information. This means that if a section has sub-sections, the sub-sections are extracted and retained in the order in which they are nested.

Thus, any text whose immediately enclosing section name ends in neither SECTION nor SUBSECTION must have come from an embedded report.

This query shows how to retrieve SNOMED disorder, finding or morphologic abnormalities from these sections of embedded reports.

SQL query

SELECT d.id as doc_id, fe.id as fe_id, sl.name as section_name,
fe.text, c.description
FROM foundentity fe
JOIN foundentitylocation fel ON fe.ID = fel.FOUND_ENTITY_ID
JOIN location loc ON fel.LOCATION_ID = loc.ID AND loc.type_ = 'section'
JOIN sectionlocation sl ON loc.LOCATION_ID = sl.ID
JOIN document d ON fe.DOCUMENT_ID = d.id
JOIN foundentityconcept fec ON fe.ID = fec.FOUND_ENTITY_ID
JOIN concept c ON fec.CONCEPT_ONTOLOGY = c.ONTOLOGY
AND fec.CONCEPT_ID = c.CONCEPT_ID
AND c.ONTOLOGY = 'snomed'
JOIN foundentitytype fet ON fe.ID = fet.FOUND_ENTITY_ID AND fet.ONTOLOGY = 'snomed'
WHERE EXISTS (SELECT 1 FROM documentstructuredmetadata m WHERE m.document_id = d.id) -- !! only C-CDA documents
AND sl.name NOT LIKE '%SECTION' -- !! find non-C-CDA sections: emtelliPro appends SECTION or SUBSECTION to every heading it recognises, so a heading that ends in neither came from an embedded report
AND fet.TYPE_NAME IN ('disorder', 'morphologic abnormality') -- !! only these entity types
AND fe.POLARITY = 'asserted'
ORDER BY d.id, fe.id
LIMIT 10;
doc_idfe_idsection_nametextdescription
14122569FINDINGSmelanomaMalignant melanoma (disorder)
14122570FINDINGSSkin lesionSkin lesion (disorder)
14122653ASSESSMENTmetastatic malignant melanomaMetastatic malignant melanoma (disorder)
14122837ASSESSMENTMass lesionMass (morphologic abnormality)

References

  • See Python Client SDK Documentation for more information about CCD file support.