sunsetsystems wrote on Thursday, June 17, 2010:
I have a project to support multiple independent OpenEMR sites from a single installation of OpenEMR.
That is, a single installation of the web scripts, but still supporting a separate database for each site. This is easier now that the global parameters and code types have been moved to the database.
Here are the things I can see that need to be done:
1. Create a “master” configuration file (this can be a flat file, something like /etc/openemr.conf). The main purpose of this is to contain the database name/user/password for each database that is supported.
2. Create a master configuration GUI (web script). This supports adding/deleting sites (and thereby modifying the master configuration file), and wraps the existing scripts used to set up and upgrade a site. Thus the GUI will display:
o A list of current sites, each with Upgrade and Delete buttons.
o An Add New Site button.
It would invoke setup.php, sql_upgrade.php, acl_upgrade.php, sl_convert.php as needed.
3. Modify the Login page to include a site selector and to not depend on globals.php prior to successful login.
4. Fix up sqlconf.php as needed.
5. There are still assorted lesser-used things in the “custom” directory like clickoptions, letter templates, the statement template, the fax cover sheet, etc. I think these are best transitioned to site-specific custom directories in the short term (don’t want to bite off too much too soon). These should be created at setup time or upgrade time. Use directory names like custom_site/<databasename>/. Move includes/config.php into there also. This will require some simple changes in various places.
Comments?