View on GitHub

Tutorial-FHIR-RDF-as-a-Bridge

Tutorial: FHIR RDF as a Bridge to the Semantic Web in Healthcare

Yosemite logo

This tutorial shows how FHIR RDF medical records using SNOMED-CT codes can be processed by a reasoner to identify diagnoses that were not directly coded. Two examples are demonstrated: a FHIR DiagnosticReport for malignant neoplasm is inferred to be an instance of CancerDiagnosis; and a report of a thyroid tumor is inferred to be a thyroid disease diagnosis.

This approach is useful in primary and secondary care institutions to count or identify patients that belong to a particular group of diagnoses. Instead of explicitly querying for every possible code that would indicate the target diagnosis – such as cancer or thyroid disease – the reasoner uses SNOMED-CT’s ontology to infer that diagnosis based on subclass relationships.

This tutorial is based on a Yosemite Project webinar and a paper from the 2017 International SWAT4HCLS Conference by Harold R. Solbrig of Mayo Clinic.

Watch the video of this tutorial (90 seconds)

Target audience

Anyone interested in using FHIR/RDF to perform inference using the SNOMED-CT ontology.

Prerequisites

Steps

  1. Clone a copy of this repository, which contains the files for this tutorial, and change to that directory.

    git clone https://github.com/yosemiteproject/Tutorial-FHIR-RDF-as-a-Bridge.git
    cd Tutorial-FHIR-RDF-as-a-Bridge
    
  2. Start Protege. If you get an “Automatic Update” dialog, you may dismiss it by clicking “Not now”.

    Protege Protege

  3. Verify that the FaCT++ reasoner is installed: click the Reasoner menu to see if FaCT++ is listed. If not, install it directly from Protege: File–>Check for plugins…, check “FaCT++ reasoner”, Install, then exit and restart Protege.
    Reasoner menu

NOTE: A user has reported: “The default preferences in Protege don’t display inferred instances, so you might want to add a note to change that after installing or users will never see classified instances.” 25-Nov-2019

  1. Open fullreport.ofn: File–>Open. This OWL file references a sample FHIR/RDF patient data record (f201.ttl) that we will identify as a cancer diagnosis, using the FaCT++ reasoner. It also references the various FHIR and SNOMED-CT ontology pieces that enable the reasoner to reach this conclusion. If needed, resolve missing imports using these local files:
    snomed_cancer_subset.ttl
    fhir.ttl
    w5.ttl
    diagnosticreport-example-f201-brainct.ttl
    patientreport.ofn
    cancerreport.ofn
    finalreport.ofn
    

    Missing import File selection for missing import Protege after successfully opening fullreport.ofn

  2. Select the FaCT++ reasoner under the Reasoner menu.
    Select FaCT++

  3. Select Start Reasoner under the Reasoner menu. It took ~30 seconds to run on a 3.4GHz laptop.
    Start reasoner Reasoner finished

  4. After the reasoner has finished, navigate to FinalPatientReportWithCancerDiagnosis in the Classes–>Class hierarchy tab and observe that f201 (the id of the DiagnosticReport) has been recognized as an instance. Success! This means that the reasoner has concluded that this patient record (f201) has a cancer diagnosis.
    Class Hierarchy Tab

    Next, we will test a different patient record for a thyroid disease diagnosis.

  5. Open thyroidreport.ofn, answering “no” to the current window prompt. Again, this file imports the ontologies that we need, imports the patient record that will be tested (diagnosticreport-example-dxreport117-thyroidtumor.ttl), and defines our target diagnosis class (:ReportOfThyroidDisease) as being anything classified in SNOMED-CT as a disorder of the thyroid gland (code sct:14304000.
    Class Hierarchy Tab

  6. Select Start Reasoner under the Reasoner menu. It took ~2 minutes to run on a 3.4GHz laptop.
    Class Hierarchy Tab

  7. Navigate to ReportOfThyroidDisease in the Class Hierarchy tab and observe that dxreport117 has been classified as an instance of thyroid disease.
    Class Hierarchy Tab

How it works

To further understand how this demo works, examine the roles and contents of the files listed below.
Class Inference

Class definitions

These are OWL files we created to specify the kinds of diagnoses that we wish to identify, such as cancer or thyroid disease.

Instance data

These files represent the FHIR medical reports that are to be analyzed to determine whether they represent the target diagnosis, such as cancer or thyroid disease. They were originally downloaded from the HL7 FHIR site, but snapshots of these files are included here to insure that this tutorial will still work correctly even if those examples are moved or modified on the HL7 site. For this reason, these files were modified to point to these github versions instead of pointing to the original versions on the HL7 site. One way to see what lines were changed is to search for the word “github” within these files.

Ontologies / vocabularies

These are standard SNOMED-CT and FHIR ontologies/vocabularies that have been downloaded for use in this analysis. Ideally these ontologies would be usable as-is after downloading them from the HL7 and IHTSDO websites. However, a few local modifications were made for this tutorial, as described below, in addition to modifying URIs to point to these github versions.

Protege files

These files are generated by Protege. They are not needed.

Acknowledgements

Thanks to Harold Solbrig for originally creating this demo, and to David Booth and Gopikrishnan (“Gopi”) Chandrasekharan for editing it into this tutorial and video.

Corrections or suggestions?

Please submit a pull request or email David Booth with “Yosemite Project – Tutorial-FHIR-RDF-as-a-Bridge” as the subject line.