FHIR and Relational Databases Robert Worden Open Mapping
FHIR and Relational Databases Robert Worden Open Mapping Software Ltd rpworden@me. com www. open. Map. SW. com
TOPICS • Making FHIR servers from Relational Databases • FHIR Transform Engine (FTE) • FTE with HAPI Server Engine • FTE and FHIR Mapping Language
Relational Databases and FHIR • Most healthcare data is held in relational databases (more than 80%? ) • For interoperability, we need to access those data in FHIR • Need to make FHIR servers from existing relational databases • This requires bi-directional transforms, and efficient search – in situ
Three Types of Transform are Needed From To Purpose Relational data FHIR Get data out FHIR Relational data Get data in RESTful search string Efficient SQL query Get data out efficiently This has been implemented for one example (PAS database => Server for Patient Resource), using the FHIR Transform Engine
Building Transforms with the FHIR Transform Engine (FTE) • Eclipse-based mapping design toolset • Automatically capture the data structure (e. g. XML, RDBMS) • Automatically capture FHIR resource profiles • Graphically Map from the data structure to FHIR • Tools generate transforms, in both directions • Automated test; fast iterative map/test/map cycle • Does all kinds of transform (e. g. flat => nested) • Escape to Java code when needed
Mapping a Database to FHIR Resources FHIR bundle class model Whole database Patient Resource Tables Columns In Patients table Green nodes are mapped Fields in Patient Resource There is no short cut to doing this analysis Mapped to Database record or column
Testing Mappings (V 2 to FHIR) Summary test scores Result of V 2 to FHIR transform ABA = V 2 to FHIR to V 2 round-trip AB = V 2 to FHIR transform All test Result files Example files used in this test A, B = codes for test files Mappings being tested
HAPI and FHIR Transform Engine • • • HAPI provides a highly capable FHIR Server Engine But HAPI does not interface FHIR resources to existing relational databases FTE does FTE is being integrated with HAPI This is the best way to make any relational database into a FHIR server Supports many searches without coding
FHIR Servers: HAPI/FTE/RDB Client A Server B User Interface Business Logic Relational Database User Interface FHIR Transform Engine FHIR HAPI Server Engine FHIR Transform Engine Business Logic Relational Database
Efficient RESTful Search • • Many different searches may be supported for each resource (see examplefrom HL 7 FHIR site) FTE + HAPI can support these searches: – – • • Do not need to code each type of search Uses efficient database retrievals Supports chained reference searches across resources Any search is possible if the DBMS stores the required information in the resources HAPI search calls are auto-converted to an SQL query, through FTE mappings DBMS uses indexes for fast retrieval
FHIR Mapping Language • • FHIR Mapping Language (FML) is part of STU 3 Defines transforms from declarative mappings (e. g. X => FHIR, FHIR => X) FML and FTE are different styles of mapping language But they are compatible: – Can now generate FML mappings from FTE mappings – Round trips are possible • FTE can act as a graphical editor for FML mappings • FTE and FML are convergent, not competing • Gives choice of mapping development tools, choice of runtime engine
- Slides: 11