Second Database Connection

Hello,

My client has OpenEMR and he has some clients, this clients use a huge library called Wiley form mental health, and the problem is, today, each client has they one app and DB, and all has this wiley on each db, the size of this wiley is close to 500mb per db.

We wanna to create a new db, just for the library and share accross all clients, I’m wanna know if OpenEMR has a built-in way to handle 2 separated connections, like when we cal sqlStatement?

Thanks

There is limited documentation related to MultiDB Zend module brought in by a vendor. One would assume they are leveraging Zend’s abstract service factory classes to establish multiple db connections. So if you are planning to create your own Zend module, you should be covered. If not -

Suggestion 1:
In the past we have addressed this and other situations at the database level by creating views to local databases. Be warned that designers of this project have chosen to avoid views in standard codebase which is a design handicap.

Suggestion 2:
If you are going to use custom/new scripts to consume Wiley data, use ajax to enhance standard views with minimal changes to standard code.

Best.

1 Like

Yeah, for me the easier approach is create my own class with my own connections, and add as a module.

But just for reference, when you talk about zend module you are talking about the modules folder right?

The reason that it is called Zend module is that the concept of modules was developed under the Zend Framework (not defuncted). It is now called Laminas. There is another folder with Zend modules in it. The modules folder you refer to is where the third-party modules live like the telehealth module.
When you open the interface/modules folder you will see a zend_modules folder also.

Hi were you referring to Wiley Treatment Planner?

Yes, exacly this one