Today the FHIR Squad has (finally) released version 1.2.0 of the FHIR2 module. This is the culmination of quite a bit of work since our last release in October 2020. We’ve had 77 commits from 15 contributors.
New Features:
Added support for Immunization Resource, stored in the Obs table using CIEL’s Immunization History (1421) structure. Note that Immunization is currently supported in R4 only.
Numerous enhancements and enrichments for the data models for orders (ServiceRequest / MedicationRequest)
Support for creating Encounter and Visits via the FHIR API
Support for setting the system field for OMRS identifiers
Support for PostgreSQL
Initial support for custom ResourceProviders defined in modules outside the FHIR module
Bugfixes:
FHIR module will now continue to work as modules are loaded or removed from the EHR
I hope you saw my Wiki edits to correct the FHIR Resource Mapping URLs to include [/R3 or /R4] and make reference to FHIR Release number page that you recommended. I logged in today to ask you about the status of some of the Resource’s support, as the mapping documentation is a mix of FHIR and FHIR2 module releases. I was going to ask about Immunization - and saw your release message… thanks!
I hope I can include your new OMOD into the Reference Application that we have installed.
@keithduddy Thanks! I’ve got to make some updates to the Wiki too for this. Please let me know if you run into any issues getting this working in your version of the RefApp!
Will do, @ibacher. We have some work time sheduled on our OpenMRS install and FHIR interop in the next week or two.
I might have been looking in (and editing) the wrong pages: (Mapped FHIR Resources - Projects - OpenMRS Wiki), as I don’t see Immunization or Visit added to the list. Is this still work in progress?
A Wiki search reveals your recent page update here (which I assume reflects the releases you mention in this thread): OpenMRS FHIR Module - Projects - OpenMRS Wiki, but the pages about individual Resource Mappings I mention above have not been updated to reflect your new work. Perhaps these pages should be either removed, or updated, as I was trying to use them as a definitive list and set of mapping instructions, and they are neither complete (e.g. Immunization, and Visit) or up to date (e.g. MedicationRequest as mentioned above).
I’d like to help by synchronising your summary of all resources mapped with the individual Resource Mapping pages, however, I’m not in a position to provide example JSON resources or the mapping tables from OpenMRS Data Model Elements and FHIR Resource Elements that appear on pages like Person Resource - Projects - OpenMRS Wiki …
Can you suggest a way forward that helps people find the most up-to-date FHIR resource request and/or mapping details in the Wiki. I think I have identified the right page above, but was lead down a bit of a rabbit hole by reading the individual mapping pages, which are out of date.
I have been floundering a bit with our previous install of OpenMRS, even to get the new UI not to crash, given that we did some ignorant configuration before installing all the modules.
I’m living in a modelling and architecture world these days, and my Java/WebApp skills are very rusty, so hopelly my implementation partner @herbertsural will have more success. He is trying to get a new install going using the Standalone version, so that we can get everything consistent again, and then we’ll re-try FHIR invocations with the 1.2.0 version module, hopefully with more success, or useful bug reports, rather than just more questions…
Thanks for all your help so far!
Keith and Herbert
Questions are also useful. In the past, I’ve tried to turn questions I see frequently into documentation opportunities. For example, I haven’t prioritised the mapping pages because I wasn’t sure anyone was using them or found them useful, but now that I know someone does, I’ll actually make an effort to ensure they are up-to-date.
So, please keep the questions, bug reports, and success stories (if any) coming.
One thing worth mentioning that the APIs supported by the FHIR module are documented in the FHIR Capability statement, which can be found at https://qa-refapp.openmrs.org/openmrs/ws/fhir2/R4/metadata?_format=json (or on a similar URL for a local install). Of course, these don’t explain how they correlate to the OpenMRS data model.
In the process of releasing FHIR2 version 1.2.2, which is mostly a minor tweak to address FM2-421. However, 1.2.2 should also be somewhat smaller (36 MB instead of 52 MB) and uses HAPI 5.4.0.
I’m not overly familiar with OMRS programs, so I’m hesitant to try to define the mappings myself. We can always add them in if someone can figure out what the mappings to FHIR needs to be. Something like the OpenMRS ↔ FHIR Mapping from Patient Resource - Projects - OpenMRS Wiki would be ideal. And, of course, we’ll need some developer time to actually implement things. I’m happy to help out with this, but it’s not something I can do on my own.
So the mechanism isn’t widely tested or anything but, roughly speaking, the process looks something like this:
Create a module that depends on the FHIR2 module
Inside your new module, create an IResourceProvider instance that looks something like this:
@Component
@R4Provider // or @R3Provider as appropriate
public class MyResourceProvider implements IResourceProvider {
// actually implementtion of the resource provider
// see the HAPI FHIR docs here: https://hapifhir.io/hapi-fhir/docs/server_plain/resource_providers.html
}
Create a file in src/main/resources/META-INF/services called ca.uhn.fhir.rest.server.IResourceProvider with a single line like this:
@ibacher I just tried this out and It seems to work fine. I was actually experimenting on Episode Of Care. Will perfect it and then move it to the fhir2 module where it belongs. For now, I need to find ways of dealing with Generifying things like managingOrganization which is a great deal when it comes to sending patients to Other FHIR servers.
Also, I would like to share what we have done in UgandaEMR sometime which might be useful to the community