Great
Hi @ibacher @sharif @ccwhite23,
I could build and run the OpenMRS Core application locally after I checkout into the 2.3.0 tag in openmrs-core. Then I Downloaded Reference Application 2.10.0 Addons and put all the OMOD files and OWA files in its to ~/.OpenMRS/modules
directory. Now the local application is running with fhir-1.20.0.omod.
I tried to run several queries with localhost:8080/openmrs/ws/fhir2/
URL pattern.
example - http://localhost:8080/openmrs/ws/fhir2/Patient?_id=00b8fdd1-7c6b-418c-8371-501d43564c5e
All of them giving HTTP 404 Not Found.
But queries are working for localhost:8080/openmrs/ws/fhir
URL pattern.
example- http://localhost:8080/openmrs/ws/fhir/Patient?_id=00b8fdd1-7c6b-418c-8371-501d43564c5e
Do I need to configure additional things to test fhir2 module in locally?
Thank You.
The FHIR2 module. The FHIR1 module is deprecated.
It sounds like you followed the correct procedure. Could you possibly post the server log (~/.OpenMRS/openmrs.log) using pastebin? The 404 error indicates that the FHIR module either isn’t properly installed or didn’t start correctly.
Note that you can’t have both the FHIR1 and FHIR2 modules installed on the same system at the same time.
Currently, search by _id
is not supported by FHIR2 because GET /Patient?_id=00b8fdd1-7c6b-418c-8371-501d43564c5e
is exactly equivalent to GET /Patient/00b8fdd1-7c6b-418c-8371-501d43564c5e
. The _id
parameter is useful for some more involved queries that we don’t (currently) support, but should support soon.
Hi @ibacher,
Now my local setup configured as follows.
- Get openmrs-core from Git repository.
- Checkout its 2.3.x branch.
- Build the project. ( cd openmrs-core & mvn clean package)
- Downloaded Reference Application 2.10.0 Addons and put all the OMOD files and OWA files in its to
~/.OpenMRS/modules
directory. - Get openmrs-module-fhir2 from Git repository.
- Checkout its master branch.
- Build the project using
mvn clean install
command. - Copy the fhir2-1.0.0-SNAPSHOT.omod file in
openmrs-module-fhir2/omod/target
directory. - Delete fhir-1.20.0.omod file from
~/.OpenMRS/module
s directory. - Paste fhir2-1.0.0-SNAPSHOT.omod file in to the
~/.OpenMRS/module
s directory. - Run the OpenMRS Core project. ( cd openmrs-core/webapp & mvn jetty:run)
Now both fhir and fhir2 calls are failed
I have attached the log in to here.
Do I need to build fhir2 module from another branch or tag apart from master?
Thank You.
You might need to specify the FHIR version in the URL, e.g. , /ws/fhir2/R4/Patient/00b8fdd1-7c6b-418c-8371-501d43564c5e
.
Hi @ibacher,
Many thanks for the given help. Now it is working.
I think GSoD 2020 needs FHIR module API documentation for this latest module. Not the deprecated FHIR1 module.
I hope to join with FHIR weekly call at 4:30 AM Thursday(IST) for further clarifications.
Hi @ibacher , This may be a dumb question: what is the difference between OpenMRS REST API and FHIR API?
Thanks!
Hi @rainbow,
According to my understanding, FHIR APIs support to export and import data into the OpenMRS in FHIR Resource format, which is an international standard of handling Electronic health records. Currently, there are few API Endpoints which support to retrieve some resources (ex- Patient,Person) in OpenMRS. If you need more information about FHIR, I think my article about FHIR might be helpful to you.
OpenMRS REST APIs support all the CRUD operations which can be applied on any resources in the OpenMRS and that does not use any specific standard to export and import data into the OpenMRS.
Thank you! So FHIR essentially is a standard for translating data, if data needs to be exported to or imported from a system other than OpenMRS ?
Yes.This standard would be really helpful when we need to transfer data between healthcare applications which use same standard to store data. So we don’t need to do any data mapping. As an example Apple uses the FHIR standard inside the iPhone to make the connection between the electronic health records (EHR) and a user’s Health app.
Thanks! Also your installation steps for FHIR is just what I was looking for! Thank you again.
Hi @ibacher,
I think It would be great to add steps of configuring FHIR module locally along with the OpenMRS- Core into the wiki page. Then newcomers can easily setup it. Shall I add them in to the OpenMRS FHIR Module Documentation page?
Thanks.
I would like to suggest you to create a seprate talk thread for the project and continue all the discussion there. Like @kaveeshabaddage does for fhir rest api docs here
@ayesh I thought that we can use this for Extend REST API documentation project. Do we have to create a new thread?
So this is for all the projects normally for GSoC GSoD or even Outreachy we have to create a separate talk thread to talk about the project. For examples :-
https://talk.openmrs.org/t/developing-user-friendly-documentation-for-fhir-api-gsod-2020/28724/2 https://talk.openmrs.org/t/gsoc-2020-improving-openmrs-dhis2-integration/28623/5 https://talk.openmrs.org/t/gsoc-2020-expose-system-metrics-for-monitoring/27106/82
Thank you @herbert24 and @ayesh. I’ll create a thread
Sounds like a great idea to me!
@uthpala please put the url of the thread here thank you .