Project - FHIR Integration

Fast Healthcare Interoperability Resources (FHIR) is a standard for exchanging healthcare information electronically. Goal is to integrate a FHIR server and client with OpenEMR to allow importing and exporting of patient data.

Selected Student:
@yashrajbothra

Mentors:
@brady.miller (primary)
@sjpadgett
@dixonwhitmire
@rhausam
@ken

2 Likes

Dear Mentors,

Hi! I am Akhil from India. I am an undergraduate pursuing my degree in Computer Science.

I have experience with Web Development - PHP, Javascript and would love to be a part of GSOC 2020 under this project.

I request you to kindly let me know of the proceedings on how to begin.

Thanks :smiley:

1 Like

For the benefit of others I’ll post what I did in the slack. Jerry Padgett is much more in this space recently than I have been but I’ll post a few things to get people started and he can confirm / elaborate more on what I’m saying.

You can start by taking a look at the argonaut FHIR implementation guide / specification here: http://www.fhir.org/guides/argonaut/We would like to get to the point where we have the Data Query Implementation built. I believe Jerry Padgett has done quite a bit of work on the Questionnaire implementation also and can comment on that. You can see in the codebase the beginnings of our work in implementing FHIR in the following files:

https://github.com/openemr/openemr/blob/master/_rest_routes.inc.php

https://github.com/openemr/openemr/tree/master/src/FHIR/R4

https://github.com/openemr/openemr/tree/master/src/RestControllers

Once again, Jerry Padgett has been in this area much heavier than me so he can also offer guidance and direction on what he thinks would be best to start off with.

3 Likes

Dear sir,

Hi! I am Devashish , currently a UG student in IIT ROORKEE, India.

I have some experience with Web Development - PHP, Javascript, React , Vuejs and would love to be a part of GSOC 2020 under this project.

I request you to kindly let me know how to begin.

1 Like

Hi,
As @adunsulag pointed to some background on OpenEMR Fhir implementation thus far I want to point out that we are not trying to be a full service server implementation of Fhir. This narrows our focus on clinical setting and the resources required to communicate health information leaving much of the Fhir administrative capabilities as an aside for now.

While implementing resource search capabilities is of great import, it is more a priority to get the searchables in place meaning, Fhir resources. Currently we have two main resources, Patient and Encounter with Practitioner tagging along. While these are not complete, mainly because they can rely on resources not currently in place, they can serve as a template to new resource development.
Namely:

  • Create resource Rest controller class src/RestControllers.
  • Create service class to support to src/Services. Currently , because i’m frugal i’m using only one class for services: src/Services/FhirResourcesService.php but probably each resource should have its own class. You can look here though on how I use Fhir src/FHIR/R4 classes to build resources.
  • I should note that while the R4 classes are not necessary to implement any of the json structures, these classes(R4) are built from the specification and will make changing Fhir release support much easier in future rather than dealing with a hundred different json structures scattered about. You may also parse incoming json to the classes. Though more tedious to use the classes, I feel worthwhile in long run. I’m open on this so speak up if you want to go another way.
  • Create routes in _rest_routes.inc.php.

So for now let’s concentrate on getting our resources developed. Setting up search will require developing some interface/adapter classes but if anyone feels like starting search, feel free.

So these resources ideas will be of great help:

  1. Organization
  2. Condition
  3. Procedure
  4. Observation
  5. QuestionnaireResponse - I’m working this one.
  6. Or any clinicals from here: https://www.hl7.org/fhir/resourcelist.html

I’d pick a simpler one to start like condition or organization.

So any taker or questions?

2 Likes

Hi @sjpadgett

I’m Asha from Sir Lanka. I would like to work on Organization to get an understanding. could please guide me to get started ?

Hi @Asha_Sulaiman,
Recommend your first step to be getting a OpenEMR instance running then a setup for accessing our APIs via REST(I like to use a REST browser plugin). openemr/API_README.md at master · openemr/openemr · GitHub
Review the src/FHIR/R4/FHIRResource.php and src/FHIR/R4/FHIRResource/FHIROrganization/FHIROrganizationContact.php classes along with the https://www.hl7.org/fhir/organization.html json example to get an idea of structure.
Follow the pattern of my previous post.

1 Like

Hi, I am Shebin Silvister, CSE UG student from India. I am currently going through the codebase for this project and I would like to seek clarification on a few points:

  1. I could locate the tables for the Patient and Encounter Resources. However I’m unable to trace the tables/attributes for the Organization and the Condition Resources. Could you please guide me on the same and provide few details regarding the relationship among the tables.
  2. The getOne() and getAll() functions have already been implemented in the FhirRestController Class. The implementations for the functions getVital(), postVital(), putVital(), etc. are not yet done; so would like to know if there is a requirement for including these implementations.

Thank You.

Hi,
I don’t understand what you’re doing.
The fhir rest interface follows the same pattern as our standard api’s.
Regarding api pattern for fhir: you’d want to create a controller and service for the fhir Organization Resource(or whatever resource you are working). Then setup your route in _rest_routes.inc.php.

Use the already included R4 classes for creating your resources. It is not necessary to use FhirRestController Class and is there as a guide however, you can go ahead and place your resource json builder there as I think we may want to keep all the resources in the same class.
By looking at our standard api controllers and services you can get a feel for openemr tables and the various tools available by them to access patient data. These reside in openemr/src directory.

Best advice I can give is to look at the src/RestControllers/FhirPatientRestController.php and follow that logic.
First task is to setup your development platform for testing then call some existing api’s.

3 Likes

Hello Everyone,

On the first look i was not able to understand this project specially because of the jargon FHIR. But today i thought to take a look on it and when i read the docs of FHIR i was able to understand the purpose of FHIR and implementation as well. So now i am intrested to contribute in this and for first thing todo i think i should implement search capablity in Practitioner to get more understanding of it.

Should I add Patient.active function in FhirPatientRestController?

2 Likes

While Trying to implement this i saw something. if we call FhirPatientRestController(PId))->getOne() and Pid in not assigned then also It returns the PatientResource is it okay?

As Per Docs -> https://www.hl7.org/fhir/bundle-search-warning.html

1 Like

hi @yashrajbothra ,

Agreed that it is very odd to return an empty PatientResource. For example, here is what I get with the http://localhost:8300/apis/fhir/Patient/3 endpoint if there is no patient with pid of 3. If there is a standard to follow in this situation, then we should follow it.

2 Likes

While i was creating my proposal i got a small little doubt. When we create a restController as of now there are two functions getOne() and getAll() but i can’t find anything like that in docs are we suppose to create only two methods for every resource or there are more ?

Oops, Gotcha https://www.hl7.org/fhir/operations.html , https://www.hl7.org/fhir/http.html :+1:

1 Like

Don’t know why I haven’t been getting notifications for this thread so sorry.

Dear Mentors,

Hi! I am Wisdom Matthew from Nigeria. I am an undergraduate pursuing my degree in Computer Science.

I have experience with Web Development - PHP, Javascript, MySQL, HTML and would love to be a part of GSOC 2020 under this project.

Thanks

2 Likes

Welcome @wizdom :tada:

I have a Doubt regarding Terminologies. Are Planing to use codes in resources. If so how can we integrate Valuesets?

@yashrajbothra I may be able to help answer your question on value sets and using codes in resources. Maybe a start could be the tutorial that I give on FHIR Terminology at the HL7 meetings, which probably should cover at least some of your questions. Here’s a link to the latest copy (from a webinar I gave 2 weeks ago - it’s Creative Commons licensed). And if you can ask some additional more specific questions, that would be great.

2 Likes

Thanks @rhausam for your refrence it will definetly help us integrating FHIR.