Sync 2.0 FHIR Object Mapping

fhir
synchronization
sync2
Tags: #<Tag:0x00007f23ec0692a0> #<Tag:0x00007f23ec069160> #<Tag:0x00007f23ec069020>

(Karol Cissewski) #13

@dkayiwa Yes. For example FHIR Group object has no description field so Cohort.description won’t be synced.


(Daniel Kayiwa) #14

@kcissewski was it agreed upon that such data is not critical and hence can be ignored in production?


(Karol Cissewski) #15

@dkayiwa No it wasn’t agreed. I think we should review which data is critical and required on production. In case of required data we can use extension on maybe other field.


(Mike Seaton) #16

I have long been concerned by this and have often expressed my desire for us to focus first on synchronization of all data via the OpenMRS Web Services model, and add the option of syncing with FHIR as a secondary feature, as for me the most important thing for the sync module is to reliably sync any and all data between 1-N OpenMRS instances in the same managed network.

Can someone involved with the sync2 project explain the primary use case of using FHIR as a data exchange format for Sync2? Are we doing this in anticipation of Syncing data with other systems (FHIR servers or other systems in an HIE)?

Thanks! Mike


(Daniel Kayiwa) #17

@kcissewski i do not think any implementation would take on a solution that regards any collected data as non critical, and hence that can be lost during synchronization. :slight_smile:


(Wyclif Luyima) #18

I think am with @mseaton on this, I think the most important thing is to be able to sync data, using FHIR vs another data format is of less significance as of now, I want to believe FHIR has not yet been widely adopted so we shouldn’t let it hold us back or slow us down.


(Karol Cissewski) #19

Dear community,

I fixed Allergy and Cohort mapping proposals. To synchronize fields that are missing in FHIR Objects we will use extensions. This will let us synchronize all object fields.

Regards, Karol


(Krzysztof Kaczmarczyk) #20

Hey Mike. Yes, supporting FHIR standard is mainly done in anticipation of syncing data with other systems. I believe FHIR is getting traction nowadays. Support for it shouldn’t slow us down significantly and also it is likely better to plan in longer term.

The main goal of Sync2 module will be to sync any and all data between multiple OpenMRS instances.


(Mike Seaton) #21

Thanks @kkaczmarczyk. If we can achieve this (using extensions, etc), it would definitely be a huge benefit to have 100% FHIR coverage over the OpenMRS data model.

That said, my understanding from the early days of this project was that one could choose “Rest” or “FHIR” for a given entity that needs to sync, and we were mixing and matching these approaches. I was always curious as to why we didn’t just first try to solve the problem using REST, since theoretically everything is already available using this mechanism, and if it isn’t then this is a bigger priority to fix than FHIR support.

That wouldn’t close the door to supporting a FHIR-based approach, but rather just prioritizing getting sync working with existing REST representations and not getting slowed down by the work involved in mapping OpenMRS entities to FHIR resources in a way that might require broader community design input and iteration.

Best, Mike


(Daniel Kayiwa) #22

I completely agree with @mseaton


(Krzysztof Kaczmarczyk) #23

@mseaton Thanks - these are legitimate questions. I wasn’t involved in this project last year, hence I don’t know full context.

@pgesek Can you shed a light on the prioritization of FHIR support rather than REST?


(Paweł Gesek) #24

@mseaton @kkaczmarczyk Sync 2.0 had FHIR written all over it from the start. The initial statement of the project we got from the OpenMRS community was:

Initial statement:

Replacement for openmrs sync module based on FHIR (as much as possible) and atom feeds

- LOE: 6+ months
  • Customers: of interest to many existing OpenMRS implementations (many are desperate for a usable & reliable sync solution)

From what I understood the intention was always to further OpenMRS interoperability by using FHIR and that was an integral part of the Sync 2.0 effort. Using OpenMRS REST representations was done primarily to represent resources that couldn’t be represented in FHIR, but also to showcase how the module can be extended with different connectors (FHIR, REST, HL7?, etc.). But FHIR was always treated as the primary means for communication.

As to why the whole thing wasn’t done with REST to begin with - the idea of the MVP was to just showcase synchronization of patient data and that was done with both FHIR & REST - it demonstrates how different sync methods can be used to achieve syncing.

Regarding the path forward, my opinion is that we definitely should be adding REST connectors in order to keep the idea of an extensible module alive, but shouldn’t push FHIR to the side. We should start these discussion about the representations sooner rather than later, especially since the current scope of the project also has FHIR written all over it.

Regards, Paweł


(Daniel Kayiwa) #25

@kcissewski have you already laid out a plan of how you are going to use extensions for fields that are missing in FHIR? Can you share some examples?


(Jakub Trzebiatowski) #26

Thanks for your feedback everyone! @dkayiwa @mseaton @wyclif

I’m working on the way how to use FHIR Extensions for OpenMRS needs. I just finished initial research on the extensions.

For anyone interested in FHIR Extensions, but not really into them yet, I suggest reading the following blog posts. They explain in an easy way a lot on FHIR extensions.

The work on the extensions can be tracked under the following tickets. We decided to start the implementation of the FHIR strategies without extensions first, the extensions will be added in the ticket FM-260.

I’m currently looking for existing FHIR extensions, located on public repositories, that match our needs. We want to minimize the number of new extensions we’ll have to create. However, for all the fields that won’t match any existing extensions, we will have to create a new local extension.

We will share additional details on the extensions as soon as we will have determined what extensions we are going to use, and what extensions we will have to create. This should happen within a few days.

Once again, thanks for your feedback and time.

cc @SolDevelo


(Darius Jazayeri) #27

Sorry for my slow reply on this. I wrote that initial statement that Pawel mentioned, and I definitely want to see the FHIR improvements happen via this project because it has lots of ancillary benefits. And it hopefully gives us some protection from data model changes, e.g. even allowing you to sync between OpenMRS servers running different versions of the API.

One thing, though, is that if some domain object does not map well to a FHIR resource, or the FHIR resource is low-maturity, then we should not hesitate to just synchronize that domain object via REST. (Especially for the metadata.)

And like others have said, all data must be preserved when synchronizing. Except for one thing: it is not necessary or desirable to preserve the database primary key. (E.g. I just peeked at the mappings for Cohort and I see “cohortId” mentioned there, requiring an extension, but this should not be included from the perspective of sync.)


(Darius Jazayeri) #28

One further addendum. I do not personally think it’s necessary to synchronize “dateCreated” and “dateChanged” and a few similar fields, or to represent these in FHIR. (I’m curious what others think.)

Can we scheduled time on a design call to go through the proposed mappings? There is a lot of content there, and it’s obviously hard for people to make time to review it, so maybe scheduling that time is best.

Specific comments (just based on quickly reviewing these during my last call):


Synchronizing dateCreated and dateChanged. Is it needed?
(Krzysztof Kaczmarczyk) #29

@darius Awesome - thanks for concrete feedback. I agree that scheduling a time for a design call should speed things up and hammer out object mappings.

I’ve proposed object mappings as a topic on Propose a Design Forum Topic for next available slot and I invited people that are involved in the discussion here or likely were in the past. Let me know if someone else could be invited as well.


(Jakub Trzebiatowski) #30

I’ve looked through public FHIR extension repositories (hl7 and simplifier) for extensions that might match our needs.

I’ve found 5 FHIR Extensions that might be useful for OpenMRS. I’ve published them on Confluence, under the following URL: https://wiki.openmrs.org/display/projects/FHIR+Extensions

Hope it helps in any way.


(Dominic Surrao) #31

Have you looked at the FHIR dosage resource (https://www.hl7.org/fhir/dosage.html) for maximumDailyDose?


(Burke Mamlin) #32

We had a design call on 2 Oct 2018. Notes available here.