OpenEMR Multiple Sites Module

From OpenEMR Project Wiki
Revision as of 21:07, 4 November 2011 by Bradymiller (talk | contribs)

Overview

Very cool module that allows creation of Multiple OpenEMR installations from one codebase footprint (note that each OpenEMR installation does have it's own MySQL database). The instance specific files are stored in the openemr/sites/<installation-name> directory. So, for example, the 'default' installation specific files can be found at openemr/sites/default.

Installation of a new site

These instructions are assuming you have already installed OpenEMR (the default site).
  • Go to http://<your_server_name_or_IP_address>/openemr/admin.php
  • Click 'Add New Site'
  • Note you will need to assign read permission so the openemr/sites directory
  • Go through the setup step, like a new installation.
  • At Step 2, note the two additional options:
  • Source site (pick a site to copy the configuration files from)
  • Clone Source Database (if want to clone the database of a already existent site)

Upgrading

  • Move all directories for each site
  • openemr/sites/<site_name>/documents
  • openemr/sites/<site_name>/edi
  • openemr/sites/<site_name>/era
  • openemr/sites/<site_name>/letter_templates
  • Configure the openemr/sites/<site_name>/sqlconf.php file for each site
  • Copy variables from the old sqlconf.php to the new one
  • Set the $config variable to $config=1;
  • Open admin.php in web browser (http://<server_name>/openemr/admin.php)
  • If displayed, click 'Upgrade Database' for each site (and follow instructions)
  • Update the ACL access controls for each site:
  • http://<server_name>/openemr/acl_upgrade.php?site=<site_name>

Patches

  • Open admin.php in web browser (http://<server_name>/openemr/admin.php)
  • If displayed, click 'Patch Database' for each site
  • Note this feature will be added to the next 4.1.0 patch release (this comment date is 10/23/11) (The current work around before the patch is to do the following for each site: http://<server_name>/openemr/sql_patch.php?site=<site_name> )

Backup/Restore

Backup and restore has some new and interesting behavior. Each site is still backed up individually, and the backup script is careful to omit the site-specific directories of other sites. The restore script has a new option to specify the site ID being restored, and when the target OpenEMR directory already exists it will preserve that directory and restore only the site-specific subdirectory. Note there is no feature at this time to back up multiple sites at once.