How to deploy and access OpenMRS FHIR Server

i have successfully deployed a localhost instance of OpenMRS using the downloaded war file and reference implementation from Download – (I’m using downloads from the 2.12 Advanced Installation and the 2.4.3 war file and the modules from the “Download Reference Application” link.

I’ve included the fhir2-1.2.2.omod file in my deployment (apache-tomcat-8.5.85\webapps\openmrs\WEB-INF\bundledModules) but I’m not seeing how to access OpenMRS using FHIR (the only url tomcat shows for the deployment is the /openmrs url as would be expected).

Is there a separate war file or application that needs to be deployed to access OpenMRS using FHIR?

How do I install this functionality?

if you are seeing FHIR module among the installed modules them it is installed. There ain’t any UI or something like that, as far as i know.

1 Like

You access OpenMRS FHIR resources via its REST API. For instance, this is the url for the patient resource .../openmrs/ws/fhir2/R4/Patient

Here is the list of the supported resources:

1 Like

Awesome, thanks for the help!

It looks like there is something there, but I need to authenticate, I’m not sure how to authenticate. Is this documented somewhere? When I go to /openmrs/ws/fhir2/R4/Patient I get this error:

401 Unauthorized: The request has not been applied because it lacks valid authentication credentials for the target resource.

It uses either Basic auth or OpenMRS’s session-based authentication.

Thanks @ibacher, @dkayiwa, and @jnsereko!

With your help I was able to get the FHIR functionality up and running. I was able to access this url using Postman and Basic Authentication (running openmrs on Tomcat on my localhost):


And how is this configured to have external sync with hapfhir server. I have not found one clear example

@tendomart is this of any help? Architectural Design Approach to support an integrated approach to patient-level indicator reporting for OpenMRS - Projects - OpenMRS Wiki

1 Like

thanks @dkayiwa let me explore and see

was a good reference …thanks