Can I go multi-tenant with Platform & RefApp?

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

@ssmusoke you may want to edit this as you see fit: https://wiki.openmrs.org/display/projects/Merge+Patient+data+from+Multiple+Installations

Hi All, enjoyed the discussion. Is this multi-tenancy exist in openMrs or any support exist for multi-tanancy in openMrs? Thanks

Hi is there any update on multi-tenant support? Is there a suggested path for how to approach it?

Thanks!

@danialbet what do you think of this? Bahmni as Multi-Tenant SAAS solution - #3 by angshuonline

1 Like

@danialbet some more reading:

Multi tenancy is a fancy word that is often used, but at the end of the day, what is really intended by it?

When unexplained I read in it that people want certain provider(s) to own certain patient files. Meaning conversely that a patient file that doesn’t belong to a provider should be invisible to that provider.

That is one of many possible definitions for a multi tenancy functional specification. Is that what you want to achieve? And if not, what is your functional use case?

1 Like

Appreciate the reading. That was helpful. When I’m referring to Multi-tenancy, a part of the definition is in fact certain provider(s) to own certain patient files. It is also having separate instances similar to the example in the reading where clinic1 would go to clinic1.openmrs.com and clinic2 would use clinic2.openmrs.com. Each would potentially have unique configurations wrt to logo’s/concepts/etc…

Assuming you’d use O3, this is more or less already achievable.

Splitting data (and hence metadata such as concepts) based on business rules can be done, that’s Data Filter. One massive thing out of the way! However a lot of business analysis to figure out the actual business rules, there’s work there to be done.

Sticking to a specific URL when browsing can certainly be done with Nginx that would sit in front. Anyway deploying O3 with Nginx is the recommended approach. Basically you would ensure that if someone started browsing via clinic1.example.com then this URL would follow them all along their browsing experience, and they would be served what is mapped by Nginx into a subfolder for clinic #1.

Typically each subfolder would serve what is specific for a clinic:

  • The subfolder /clinic1 would serve the ESMs and frontend config for clinic #1.
  • The subfolder /clinic2 would serve the ESMs and frontend config for clinic #2.
  • … etc.

Obviously you need to figure out an appropriate CD process, but that’s totally doable and out of scope (it’s not an OpenMRS question).

Just brainstorming :wink: That’s how we would approach such requirement. Credits to @mksrom and @achachiez for some of the ideas shared above.

1 Like