Bahmni central DB for rural installations

Tags: #<Tag:0x00007fa3edf5cdf8> #<Tag:0x00007fa3edf5cd30>

Hi fellow Bahmni implementers! I was wondering if Bahmni is able to work as a central installation with “default” database architecture and additional “child installations” (full installtions on premise) which use this central DB remotely? Is this possible and if so - how? During my research in this forum I found a similar but not the same question from itaney10 Can I have a parent-child setup across multiple clinics with Bahmni?
darius answered this is a hub and spoke implementation (which is currently still under dev). Please correct me if I am wrong…but I think I am looking for something a bit different.

Appreciate your answers and sending kind regards from Vienna

@gernot I’m not 100% sure I understand what you’re describing; could you try to state it in a different way?

I think maybe you’re saying that there’s one central database, and the child installations are running the code and webservers, but they don’t have a local database, and they connect remotely to the central database. (And thus you’d have multiple application servers connecting to the same mysql instance.)

If that’s what you’re suggesting, it seems unworkable because “rural installations” would have slow/unreliable internet connections. (Unless you’re talking about rural Austria…) It seems like it would have worse performance characteristics than just connecting to the central server’s web UI over that network.

Also, Bahmni (and the underlying OpenMRS) assumes that there’s only one single copy of the application attached to the database. So if you wanted to do something like this you’d need to take extra care to ensure that scheduled jobs are only run on one server, etc.

Or are you suggesting something different?

1 Like

@darius thank you so much for your reply. Yes your guess is perfectly right - we are thinking of an environment with several locations or application entities which should connect to the same central DB. In your opinion is ths do-able with the bahmni environment? Or would you suggest a different approach?

Also we thought about hosting everything central and “just” giving the remote locations a virtual desktop for their work and a VPN connection to the hosting center - by chance have you heard about a similar installation?

kind regards from Vienna

You can use Bahmni for multiple locations (physically different). But there are some work to do

  • If the usages are not for the same entity (org), then you would probably want to keep the data segregated. A virtualized environment on cloud like AWS can help in that. You can have multiple app server nodes connecting to specific entity/org databases.
  • If its the same org, but you still want to keep the data logically partitioned, then you will have to customize every list/queue/query which are specific to a location. Its doable as well, but needs work.
  • In the above, if you want to restrict user to see another user’s patient, the above way of segregating like views, lists etc - will not be enough. You will probably have to do some customization where the current logged in user does not have access to patients whom he/she is not seeing.

Regarding using Virtual Desktop, the connectivity and latency will still apply. Team Viewer like apps use RFB protocol (remote frame buffer). Its doable, but the UX is pretty bad (atleast from my experience of troubleshooting installations in low connectivity areas)