FHIR RDF in Action

Harold Solbrig, Mayo Clinic

Amsterdam, 15-17 November | @fhir_furore | #fhirdevdays17 | www.fhirdevdays.com

FHIR® is the registered trademark of HL7 and is used with the permission of HL7. The Flame Design mark is the registered trademark of HL7 and is used with the permission of HL7. About Me – Harold Solbrig

• Began in 1972 doing nuclear reactor safety software • Began medical computing 1975-78 – Berkeley Scientific Labs • First commercial Unix sysop • Hardware - disc controllers / television newsrooms • Worked on ASN.1, ISO 11179 (X3/L8) (), ISO TC 215 (healthcare), OMG, HL7, WHO, IHTSDO / SNOMED International, ISO TC 37 (terminology) • BS in Maths and Computer Science, MsC in Software Engineering • With Mayo Clinic 1999-today (more or less) About Me – Harold Solbrig FHIR RDF in Action - Outline

• FHIR RDF with SNOMED and OWL • FHIR RDF and i2b2 • fhir.schema.org (if time allows) FHIR Resource Instance in RDF

http://www.hl7.org/fhir/diagnosticreport-example-f201-brainct.ttl RDF Syntax RDF Rendering Extensions – Concept URIs

JSON RDF Rendering Extensions – Resource Types

Construct the actual URI

Resource Type Ontology Header

Stay tuned: • Looking at http://hl7.org/fhir/owl/DiagnosticRepor Requirement: import FHIR URI Catalog t/f201 (or variant thereof) as an • No ‘import in RDF’ – have to use OWL alternative • owl:imports requires owl:Ontology • ‘f201.ttl’ vs. ‘f201’ – reasoners don’t cope well with something that is both a fhir:DiagnosticReport and an owl:Ontology (ontology describes report, not IS the report) Using FHIR RDF with a DL reasoner

Reasoner

FHIR DiagnosticReport Instance is (or is not) an Instance instance of Class CancerDiagnosis Class CancerDiagnosis == any DiagnosticReport w/ a dx of a type of malignant neoplasm Using FHIR RDF with a DL reasoner

Reasoner

Classification Rules Conclusions Using FHIR RDF with a DL Reasoner

reference Definition of the classes and Instance predicates used in a FHIR Descriptions Resource Instance

reference Reasoner Domain Knowledge reference

Classification Rules Conclusions FHIR Resource Instance

http://www.hl7.org/fhir/diagnosticreport-example-f201-brainct.ttl Instance Descriptions – the FHIR URI Catalog Using FHIR RDF with a DL Reasoner

reference fhir.ttl Definition of the classes and predicates used in a FHIR Resource Instance

reference Reasoner Domain Knowledge reference

Classification Rules Conclusions Concept References – SNOMED CT

http://snomed.info/id/188340000 Using FHIR RDF with a DL Reasoner

reference fhir.ttl Definition of the classes and predicates used in a FHIR Resource Instance

reference Reasoner

reference

Classification Rules Conclusions Classification Rule Classification Rules Using FHIR RDF with a DL Reasoner

reference fhir.ttl Definition of the classes and predicates used in a FHIR Resource Instance

reference Reasoner

reference

Cancerreport.owl Conclusions Loading the classification rules

https://github.com/BD2KOnFHIR/BLENDINGFHIRandRDF/yosemite_talk/cancerreport.owl Run the Reasoner Result Restrict to Patients Finalized Reports Only Finalized Reports Only

Approach is “brittle”: • Code system hierarchy is replicated as flattened strings • No link to fact that system is being used • DataProperty constraints potentially make reasoner more complex Finalize Reports Only – Proposed Solution Finalized Reports Only (cont) Finalized Patient Reports with Cancer Diagnosis Result Post-coordinated expressions

Equivalent expression in OWL

363346000 - Malignant tumor 363698006 – Finding Site 170787008 – Left lobe of thyroid gland

One possible format for compositional expression https://github.com/BD2KOnFHIR/BLENDINGFHIRandRDF/yosemite_talk/diagnosticreport-example-thyroidtumor.ttl Post coordinated classifier

… Declaration(Class(:ReportOfThyroidDisease)) AnnotationAssertion(dc:title :ReportOfThyroidDisease "Thyroid Disease Dx - disorder of the thyroid gland (sct:14304000)") EquivalentClasses(:ReportOfThyroidDisease ObjectSomeValuesFrom(fhir:DiagnosticReport.codedDiagnosis.coding sct:14304000))

) https://github.com/BD2KOnFHIR/BLENDINGFHIRandRDF/yosemite_talk/thyroidreport.owl Results i2FHIRb2 – FHIR in i2b2 https://www.i2b2.org/ • I2b2 – Informatics for Integrating Biology and the Bedside • Underlying model is “Star Schema” I2B2 Observation Fact Table

Core table maps encounter_num (which uniquely determines patient_num) + (…) + concept_cd + modifier_cd  a data type instance. I2b2 Ontology Table

Ontology table maps a hierarchical path to… … a SQL query that (amongst other things) … … returns a set of concept codes + (optional) modifier codes … that are used to select rows in the observation fact table Loading FHIR into i2b2

FHIR Metadata Vocabulary generate_i2b2 I2B2 Ontology Cell (fhir.ttl)

FHIR Resource FHIR Resource I2B2 CRC Cell InstanceFHIRFHIR Resource Resource Instance1 loadfacts (Observation_fact, Instance1Instance patient_dimension, etc.) (RDF) FHIR Resource FHIRInstance Resource jsontordf https://github.com/BD2KOnFHIR/i2FHIRb2 (JSON)Instance library https://github.com/BD2KOnFHIR/jsontordf (JSON) i2b2 queries Navigation I2B2 Ontology Cell

I2b2 Client

Query I2B2 CRC Cell (Observation_fact, patient_dimension, etc.) Matching Patients fhir.ttl  i2b2 ontology cell

FHIR Metadata Vocabulary Entry

I2B2 Ontology Table I2b2 Ontology Navigation

FHIR Observation Resource I2B2 Ontology I2b2 Observation Fact Table

FHIR in i2b2 - Status

We have proven that it can work Still have to: • Merge FHIR data types w/ i2b2 value types • Add URIs (codes) for values themselves for queries • Demonstrate that ontology can be re-structured to show clinical view rather than FHIR Resource view • https://github.com/BD2KOnFHIR/i2FHIRb2 fhir.schema.org

Question: Is there a place for the FHIR URI catalog in the schema.org space? Schema.org

• HTML Markup • Focus on online services and products • Used by Google, Bing, Yahoo! and others • Formats: • Microdata • RDFa 1.1 Lite • JSON-LD Embedded Microdata Health-lifesci.schema.org Embedded JSON-LD Fhir.schema.org - Clinical research data? Embedded RDF-A fhir.schema.org – Potential Use Cases

• Provenance for FHIR Narrative Text • HTML FHIR Interchange Format • Markup for personal device measurements • Mapping for HL& Continuity of Care (CCD) and other data formats • Markup for blogs and other Personal Embedded RDF-A Health Records (PHR) • Linking Medical Knowledge / Data / Products fhir.schema.org

NOTE: Service is not currently active - it had been located on an appspot URL – will be re-established if interests Original location: http://fhir.fhir-schema-org.appspot.com Credits

This work is supported in part by NIH grants U01 HG009450 and U01 CA18094. This work was conducted using the Protégé resource, which is supported by grant GM10331601 from the National Institute of General Medical Sciences of the United States National Institutes of Health. Eric Prud’hommeaux David Booth Dr. Guoqian Jiang Grahame Grieve The HCLS working group