HL7®, FHIR® and the flame Design mark are the registered trademarks of Health Level Seven International and are used with permission.
Amsterdam, 14-16 November | @HL7 @FirelyTeam | #fhirdevdays18 | www.fhirdevdays.com
Apache Camel and HAPI-FHIR, an open source solution
John Poth, Red Hat
Summary
• Introduction to Apache Camel• FHIR use cases (code involved)• Camel ecosystem (tooling, monitoring, management)• Live demo (if time permits)
About me
• Name: John Poth• Company: Red Hat• Background:
• Red Hat Fuse• camel-fhir author• 8+ years integration• github.com/johnpoth• @pothjohn• jpoth on Freenode
What do we mean by Integration?
System A System B
Apache Camel is the glue between disparate systems
Transport A
Data format A
Transport B
Data format B
Enterprise Integration Patterns (EIP)
Content based router
Data type transformation
Endpoint
Resequencer
Dynamic router
Splitter
Aggregator
Content enricher
Message
Camel vs World (Components)
Saas
IoT
Enterprise
Public Cloud
● File● FTP● HTTP● TCP/UDP● JMS● JPA● SQL● ….
● Salesforce● SAP● ServiceNow● Gmail● ...
● Google● AWS● AZURE● Kubern
etes● MQTT● CoAP
Extensibility is at the core of Camel
● EventNotifierSupport● Dataformat● Component● TypeConverter● Registry● Language
● CamelContextStartedEvent● DefaultEventFactory● ExchangeCompletedEvent● ExchangeCreatedEvent● ExchangeFailedEvent● FailureEvent● RouteAddedEvent● RouteRemovedEvent● RouteStartedEvent● RouteStoppedEvent● ServiceStartupFailureEvent● ServiceStopFailureEvent● ….
What is camel-fhir ? (2.23.0-SNAPSHOT)
• Embeds HAPI-FHIR FHIR client• https://github.com/jamesagnew/ha
pi-fhir
• Adds FHIR component/ Dataformats
• Spring boot starters and auto configuration, Karaf features
CAMEL-FHIR API
• FhirCapabilities• FhirCreate• FhirDelete• FhirHistory• FhirLoadPage• FhirValidate
● Interceptors ( Authentication, GzIp, Logging...)● Client configuration (Performance tuning, time
outs ..)● Alternative HTTP Client Providers● Parser options● Encoding● ...
• FhirMeta• FhirOperation• FhirPatch• FhirRead• FhirSearch• FhirTransaction• FhirUpdate
Client API Configuration
Scenario 1: Import CSV
• Poll directory containing CSV files representing Patients
• Convert to FHIR DSTU3 Patient• Upload to FHIR server• EXTENDED: error handling• EXTENDED: Redelivery
Scenario 2
• Expose a RESTful API that accepts a MRN
• Query FHIR Server for the Patient resource and all related Observations in Parallel
• Convert to HL7 V2 message• Insert message into HL7 server• Return response
Scenario 3
• Expose a RESTful API that accepts a “,” separated list of MRNs
• Fetch Patient from FHIR server• Convert to Salesforce Electronic
Health record• ‘Upsert’ into Salesforce• Handle each MRN in a separate
thread
Documentation
https://github.com/apache/camel/tree/master/components/camel-fhir/camel-fhir-component/src/main/docs
Camel community
• Github: https://github.com/apache/camel• Website (under construction): https://camel.apache.org• Issue tracker: https://issues.apache.org/jira/projects/CAMEL• Mailing list: http://camel.apache.org/mailing-lists.html• IRC chat: http://camel.apache.org/irc-room.html• Gitter chat: https://gitter.im/apache/apache-camel