Can I go multi-tenant with Platform & RefApp?

I’m using the following as a part of my OpenMRS development environment:

  • OpenMRS platform 1.11.4

  • Reference application 2.3 (with those 36 modules that came along)

My requirement is that I want to go multi-tenant with the current implementation on hand. Here’re my points in support of that:

Requirements of new system:

  1. A multi-tenant system with 1 server, 1 database and multiple tenant architecture
  2. Keeping the data for each account/clinic isolated (no clinic can view patients from other clinic)
  3. Single application instance making clinic attach/detach easy and time saving
  4. Multiple branches/sites of the same clinic/hospital operating from different geographic locations able to share patient information among themselves

Drawbacks of current system:

  1. Running single instance on one machine isn’t a good idea (we cannot afford to setup a server for every instance we offer to a clinic/health-center)
  2. Running multiple instances of OpenMRS on single machine using multiple tomcat containers isn’t a good idea (we’ll need a server with very high capabilities and maintaining database also become tedious)

Can anyone help me in guiding if/how I can manage to achieve the above requirements. Also, I wanted to know if OpenMRS team is working in the direction of making the system multi-tenant.

1 Like

My recommendation would be to try to secure a spot on a Design Call to discuss your requirements and a way forward.

yeah, that my same problem, how we can procede to do that?

Work with @themoonraker13 to find a time on a Design Call, and we can try to make sure that our core developers such as @darius and @wyclif are in attendance. You can then describe your requirements to them in detail and they can help you design a solution.

Hello to everyone, I’m new in the OpenMrs and I wan’t to know if this program is what I need. For the moment I found, in OpenMRS, all the services I need, but not that one in the title :smile: . So, in OpenMrs how to allow a doctor to view only their patients? Thanks Stefano!


OpenMRS doesn’t really have this feature, though if you are a developer, or if you know some, we can help you figure out how to add that capability.

@darius Hi Darius, thanks for your reply. Yes, I’m a developer :slight_smile: Is an hard task add this feature? how can i procede?

Was waiting for @jthomas to post with the time slots available for Design Calls.

Upcoming design call schedule

You can pick up any date based on your availability and let me know. I would like to take implementation guidelines from you on any day:)

@stefano do you intend to just limit the doctors to only view their patient’s dashboards and patient view/edit page OR in general all the patient’s record like encounters, obs etc?

hi @wyclif, i intend to limit the doctors to view all the patient’s record. BTW i solved this problem using the Sync.mod. I put an istance of the program in the main server and I used it like the father, this istance doesn’t share his data with the others istance of the program, later on I created one istance for every clinics. Every istance of the program has his own DB and share his own data with the main istance of the program. Probably it’s not the best way to do this but I don’t have enough time and in this way everything it’s working. Thanks for everything Stefano.

Can be a solution to get things done in a flash but at the same time managing multiple instances would really become difficult in case any update to the core implementation is to be made.

Let me elaborate my view of a multi-tenant system that I’m thinking of:

Requirements of the system:

  1. A single instance of the application running on a performance-tuned server serving multiple clinics/hospitals at the same time
  2. All the data of one clinic/hospital should be private to itself and not visible to others
  3. There will be a governing body of the system: The System Administrator and an administrative body for each clinic/hospital called the Organization Administrator
  4. The administrator at each level will exercise roles and privileges based on their authority (i.e. system admin managing organizations and organization admin managing his/her staff/people)
  5. To extend the model we can also have multiple sites/branches of a clinic/hospital/organization able to share data as and when required

I would really need you guys out here to give your thoughts on the idea and if possible guide me the direction in which I should carry out this transformation from existing OpenMRS implementation.

This means probably massive changes both in the data model and the API.

@themoonraker13 interesting problem - the project that I am working with is trying to solve the problem from the opposite direction, there are individual installations (currently in the hundreds soon to be over a thousand). Each installation is based at a facility (no guarantee of a consistent Internet connection), and is at the same version (OpenMRS, HTML forms and concepts) - but there is a need to bring the patient records (or extracts) together to a central database.

Here site level users and metadata are not synced, neither are concepts and forms (as they are expected to be similar). So I am hoping to pick ideas from the conference using the Sync Module, manual export/import (with encryption to protect PII during transfer) etc.

The merged data (father instance) would be read-only, with an anonymised and de-identified dump used reporting and analysis purposes.

Can we arrange a design call in this week or in upcoming week to discuss on the topic. The upcoming design call dates are posted here: Want some time on an upcoming design call?

Kindly, let me know who all are interested to join the call.

Hi there @themoonraker13, @ssmusoke, I have a requirement for this topic too, and i’m interested as well. Looking at

it seems that this still didn’t get on the calendar. Do you want to go ahead and pick a date to get this rolling? I can only do anytime after the 15th of Jan, but don’t mind me, you’re welcome to go ahead and organize the call without me :slight_smile:

1 Like

Have we done any work on multi-tenancy?

Unfortunately not yet!

Support for multi-tenant hosting is something that we (Banda Health) are actively pursuing as well and I’m glad to see that this is coming back up again. Our requirements are a bit different than @themoonraker13’s in that we would “only” need multi-tenant support for the REST and data access calls but not in the UI or much of the RefApp. Perhaps this reduced scope might be a good starting point for full multi-tenant support?

Can we revive the possibility of getting this on an upcoming design call and is the any interest from others to discuss this beyond @angshuonline?

Sure, I would be happy to be part of any brainstorming