OpenEMR and FHIR

Hi folks of OEMR,

I just wanted to leave a note saying that I have been working on OpenEMR FHIR integration as a “side, side” project but feel it should really be at the forefront of our focus. So far, I have crafted an implementation strategy and have began working on a Docker solution.

If you’re not familiar with FHIR and/or want to know why it is so critically important and how it will help bring OpenEMR to the US more, I’m happy to hold a Google Hangouts call to walk through it.

Please let me know if you can offer up resources for this project.

Matthew Vita


How is this going?

I started doing this on a very limited basis for my own purpose using a Rails API that accepts REST queries from the outside world, fetches patient records via PHP from OpenEMR, then formats the data into FHIR resources. I worked a little bit with the Patient resource and was starting to look at Prescriptions. I’m not familiar with Docker, but I’d be happy to share my thoughts.

I agree that FHIR is going to be very important. Looking at the FHIR documentation though, it seems that making OpenEMR fully FHIR compliant would be a massive undertaking. Would you agree?

Hi Greg,

Hope you are well.

I am pleased to inform you that there has been some progress on this effort, but it is far from done (decent undertaking, as you have mentioned):

  1. The project has been noted as a core project on our development roadmap!

  1. Although this project has to do more with big data analytics and our awesome new data team has been “handed off” the concept, I began looking into what it would take to generate a realistic fake data source for FHIR: NAMCS FHIR Solution · Issue #1 · MatthewVita/fake-patient-web · GitHub - I am trying to “kill two birds with one stone” here because we, the OpenEMR community, are trying to be more “university friendly”. This means that by working on FHIR data projects with realistic data will appeal to bioinformatics departments as well as give OpenEMR great test data for the FHIR project. This is a “bonus” project and isn’t directly related to the FHIR work but I believe it will a great “advertisement” for when we tell the world (in the form of a press release :slight_smile:) that we support FHIR and have 300,000 realistic patient records (as you know, good patient data is hard to come by!)

  2. I spent some time thinking about a PHP-based implementation approach here:
    Fast Healthcare Interoperability Resources (FHIR) Integration - one of the interesting things with this approach is that we would be forced to really focus on the backend modernization work to separate the business/domain logic from the view because the FHIR layer will need to hit a service layer and we don’t want to copy/paste queries and business/domain logic.

  3. I spent some time testing out a very good Docker solution for FHIR resource consumption: hapi-fhir/hapi-fhir-jpaserver-example at master · jamesagnew/hapi-fhir · GitHub (you’ll notice the author is James Agnew, who gave us the original Java HAPI HL7 library so you know the solution will be very high quality). Basically, this tool will help us debug/prove our OpenEMR FHIR implementation in a very transparent and standard way.


  1. ViSolve (@visolveemr, @visolve) has written up some good points about their experience with a custom Java server-based FHIR implementation (read from Fast Healthcare Interoperability Resources (FHIR) Integration and on). It turns out that they are considering handing off this code to the OpenEMR community so that will be a decent effort in terms of testing, documentation, and maybe thinking of ways we can move the code into the PHP codebase as discussed in point 3 (however, I still think a Docker will be needed because FHIR validation/parsing is much better in the Java ecosystem at this point).

This is an essential project and I just don’t have the cycles to work on it with the OpenEMR Cloud and OpenEMR cTAKES projects I am working on. I would love to have you be the lead on it given that you have started on a Rails solution and are familiar with the spec. First task would be exploring that FHIR viewer I linked and getting in touch with ViSolve (you can CC me and the other project admins).

Sorry for answering your question of “what’s the update?” with “here’s the update, and please lead the effort” :). I understand that you may have not signed up for this, but do note that our community always does best when passionate people work on areas of the system that interest them and their users! No pressure though, so please do let me know your thoughts!


1 Like

Hi, Matthew:

Wow, looks like you all have done a lot of work.

Let me try to absorb what you posted. I have just gotten involved with OpenEMR. I don’t have a lot of cycles, but this might be something I can take on once I get more familiar with the organization. Where would be the best place to start getting plugged in?

1 Like

Awesome, sounds good.

Please get your grounding here first and don’t hesitate to ask questions!

One note about “get more familiar with the organization” - OEMR is the non profit organization that supports the project. OpenEMR is the open source project. If you are interested in the organizational side of things, I would be more than happy to fill you in on what we do and the mission.

As far as getting “plugged in” - honestly, I really enjoy the YouTube videos out there. They are user facing, but they will give you a nice overview of the major system features. You’ll want to look for the videos made by ZH and Sherwin (@juggernautsei) (very easy to follow and well done). To give you a concrete link, here’s a playlist:

As far as getting up to speed with the code, I would suggest focusing on one major feature and we can dig into the code/architecture (the system is pretty big :slight_smile: )

Maybe it would help if you listed out your main interests? Obviously you like programming, but do you have any other interests? Big data analytics? Translations? NLP unstructured chart processing? Technical writing? Design? Regulation? RaspberryPi medical devices?


1 Like

To generate a realistics patient you can use the synthea:

This project can generate +1.000.000 realistics patients.


1 Like

As an import to OpenEMR from Synthea FHIR generated data would Patient, Practitioner and Encounter resource mass import get a start for informatic purposes? If not enough, what resource’s would best serve?


What are the available resources to choose from? Any resource documentation? (If not we should start a collaboration to document the resources - what would be a good title for it?)

Currently i’m building FHIR resources to populate server from Openemr and have classes created that may be parsed into from most all the STU3 resources. For importing new to Openemr I thought I’d start with patient and encounters then maybe Observations etc. Depends on what the data set looks like that Synthea generates.

1 Like

Will look into the Synthea data set.

Beyond Synthea, there is tremendous demand to integrate OpenEMR with SMART on FHIR (a standards-based, interoperable apps platform for electronic health records)

Checkout the gallery of ready-made SMART apps for OpenEMR.

1 Like

We are implementing both jpa and sof. You might catch up here Fast Healthcare Interoperability Resources (FHIR) Integration


SMART on FHIR is a set of open specifications to integrate apps with Electronic Health Records:

Clean, structured data: FHIR
Easy-to-use, resource-oriented REST API for structured clinical data.
Scopes and permissions: OAuth2
Simple sign-in: OpenID Connect
Lightweight UI integration: HTML5

Wondering if the planned OpenEMR FHIR will support OAuth2 & OpenID Connect?

1 Like

Yes, the plan is to make available HAPI FHIR or the HSPC Reference STU3 tenant which supports Smart on FHIR and oAuth2. It is the same server you are referring to in your links except we’ll have to reconfigure some. Right now i’m set on the OpenEMR to FHIR interface for maintaining a server.

1 Like

Learn about FHIR with this free (to audit) course: Health Informatics on FHIR

1 Like

I just wanted to update this thread that companion with our new RESTful API I have also included the start for a REST FHIR API. I’m building profiles that will share duties with the FHIR Publish to external HAPI or private server endpoints client.

Now would be a good time for any suggestions or comments concerning FHIR API implementation. Especially concerning Profiles and resources.

1 Like

Just noting that the development demos have the api/fhir turned on by default for folks to test and play around with. At this moment, just the following development demo has it turned on:
(but after they reset tonight, all the development demos on that demo page will have the api/fhir turned on)

1 Like

So while looking at testing and reading up more on FHIR I found this tool created by ONC to verify our FHIR and SMART on FHIR implementation. Thought I’d push it out there for a possible validation tool to use as FHIR is being built out.

1 Like

I am very new to the hapi-fhir, I have download source (hapi-fhir-5.2.0-standard-distribution) from below link. I am trying to deploy the server on localhost.

OS: ubuntu 16.04
java version: 1.8.0_275

Please help me with deployment procedure ?


This post was flagged by the community and is temporarily hidden.