Feasibility of Modeling HL7 FHIR Profiles Using RDF Shape Expressions Language Harold R. Solbrig1, Eric Prud’hommeaux2, Deepak K. Sharma1, Christopher G. Chute3, Guoqian Jiang1 1 Mayo Clinic College of Medicine, Rochester, MN { solbrig.harold, sharma.deepak2, jiang.guoqian }@mayo.edu 2 W3C/MIT, Boston, MA; eric@w3.org 3 Johns Hopkins University, Baltimore, MD chute@jhu.edu Abstract. This presentation describes our progress to date in developing tools to mechanically parse the core models in the HL7 Fast Healthcare In- teroperability Resources (FHIR) DSTU2 Ballot, and produce corresponding Shape Expressions (ShEx) schemas. In it we describe the transformation pro- cess, and how the resulting artifacts can be used in modeling FHIR profiles, and its validation and information mapping. We also discuss our plans to integrate this process into the OpenRefine platform to provide a user-friendly interface to support RDF/FHIR data element harmonization and model transformation. Keywords. HL7 Fast Healthcare Interoperability Resources (FHIR); Shape Expressions Language (ShEx); Resource Description Framework (RDF); Semantic Web Technologies; Yosemite Manifesto HL7 Fast Healthcare Interoperability Resources (FHIR) is an emerging standard for the electronic exchange of healthcare information1. FHIR defines a collection of "re- sources" that "can easily be assembled into working systems." While a robust soft- ware ecosystem is emerging from FHIR community, the clinical community still faces a substantial challenge of transformation between existing databases and the FHIR models. The Resource Description Framework (RDF)2 Shape Expressions language (ShEx)3, developed as an input to the W3C RDF Data Shapes working group4, is a mechanism to formally describe RDF structures, providing the RDF analog to XML schema. In addition, ShEx provides a "semantic action" capability that enables conformant RDF instances to be transformed to corresponding RDF, XML, JSON, HTML, CSV, or other equivalents. In this study, we used the core resources in the HL7 FHIR DSTU2 Ballot released on April 2, 2015. The core resources are classified into clinical, administrative, infra- structure and financial categories. Both the FHIR resources and the schemas that de- scribe have equivalent XML and JSON representations. The FHIR schema to ShEx (FHIRSchema2ShEx)5 transformation tools were devel- oped in collaboration with the HL7 ITS/W3C HCLS group6, based on the their map- pings between the JSON representation of the FHIR schemas and their ShEx equiva- lent. We implemented these transformation rules in JavaScript and integrated them with the FHIRData2RDF application5. We began by creating a library of ShEx schemas, one per core FHIR resource. The library is generated by a tool that starts with a FHIR ShEx schema name from the FHIR2ShEx transformation tool and produces a file that contains the target FHIR schema and its dependencies. We also examined the feasibility of using ShEx to represent the HL7 FHIR profiles. We manually created ShEx schemas for three HL7 FHIR profiles in a genomics do- main7, Sequence, Sequencing Lab, and Genetic Observation. It turned out that the much of the ShEx schema produced for the FHIR core resources could be reused in the FHIR profiles. As an example, the ShEx schemas for the core FHIR resources Quality, Code, CodeableConcept and Patient in the Sequence profile. We are current- ly developing tools that support the FHIR profile modeling process in a semi- automated fashion, which will allow FHIR resources instances to be created and ex- changed as standardized FHIR RDF. References 1. HL7 FHIR DSTU 2 Ballot. 2015 [September 14, 2015]; Available from: http://www.hl7.org/fhir/2015May/index.html. 2. W3C Resource Description Framework (RDF). 2015 [September 14, 2015]; Available from: http://www.w3.org/RDF/. 3. Shape Expressions Langauge. 2015 [September 14, 2015]; Available from: http://www.w3.org/2001/sw/wiki/ShEx. 4. W3C RDF Data Shapes Working Group. 2015 [September 14, 2015]; Available from: http://www.w3.org/2014/data-shapes/wiki/Main_Page. 5. FHIR RDF Transformation. 2015 [September 10, 2015]; Available from: https://github.com/w3c/hcls-fhir-rdf. 6. HL7 ITS/W3C HCLS RDF work group. 2015 [September 14, 2015]; Available from: http://wiki.hl7.org/index.php?title=RDF_for_Semantic_Interoperability. 7. Alterovitz G, Warner J, Zhang P, Chen Y, Ullman-Cullere M, Kreda D, et al. SMART on FHIR Genomics: Facilitating standardized clinico-genomic apps. Journal of the American Medical Informatics Association : JAMIA. 2015. Epub 2015/07/23.