Multi-site Patient Portal

anonymous wrote on Monday, September 10, 2012:

I have managed to setup a multi-site openemr site for several doctors.  Our problem is accessing the Patient portal.

The Patient portal can be accessed by using a hard-coded link  http://<ourserver>/patients/index.php?site=<doctors_site>.
After entering the user name and password, the following error appears:

Warning: require_once(/home/infomate/public_html/sites/default/config.php) : failed to open stream: No such file or directory in /home/infomate/public_html/interface/globals.php on line 141

Fatal error: require_once() : Failed opening required ‘/home/infomate/public_html/sites/default/config.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/infomate/public_html/interface/globals.php on line 141

This points out that the “site_id” is being ignored by globals.php and instead replacing it site_id=default.  I have removed the folder default from the sites which causes the error.

How can the globals.php code be corrected to accommodate  multi-site doctor and patient portal setup.

Regards,

Robert

bradymiller wrote on Monday, September 10, 2012:

Hi,
What OpenEMR version are you using? (we fixed lots of multisite module patient portal bugs in the recent 4.1.1 release)
-brady
OpenEMR

anonymous wrote on Wednesday, September 12, 2012:

Brady,

I’m still using v4.1.0.   I will try to upgrade  to 4.1.1 and how it goes……

Since I haven’t modified anything on the patient portal yet, can I just copy the whole patient folder on top of the old one?

Robert

bradymiller wrote on Wednesday, September 12, 2012:

Hi Robert,

Upgrading instructions can be found here:
http://www.open-emr.org/wiki/index.php/OpenEMR_Upgrade_Guides

Ensure you do a backup before do the upgrade.

-brady
OpenEMR

anonymous wrote on Wednesday, September 12, 2012:

Brady,

Did the 4.1.1 patch (updated the database - didn’t bother to backup, this is a new install) …
Run both Database and ACL patch… (v4.1.1 now current version)

Patient Portal still behaves the same….
the error link is still refers to …<…public_html/sites/default/config.php >

I’m guessing the “site_id” from patient portal/index.php is not being properly passed-on to the next php script.

Robert

bradymiller wrote on Wednesday, September 12, 2012:

Hi,
Is the sites/default directory now there(it should of been brought back in via the upgrade)?
-brady

anonymous wrote on Wednesday, September 12, 2012:

Brady,

It turns out that I did the “PATCH” and not the upgrade (from 4.1.0 to 4.1.1)

Sigh…………As I recon, the patch is mostly for the database and nothing for the code.

I have already done a months worth of face-lifting the admin.php and the individual sites front pages, that’s why I’m hesitating to do a complete upgrade.  I’m looking for the change-log (i can’t find it) to check just the files that  might affect the Patient Portal and maybe I can just do a manual copy/overwrite of the codes involved ….

Robert

anonymous wrote on Wednesday, September 12, 2012:

One thing more ……  I have also corrected a lot of deprecated syntax from 4.1.0 and I don’t want to go through that again as we have already gone live a few days ago.

anonymous wrote on Thursday, September 13, 2012:

Brady,

I already successfully upgraded my system to v4.1.1 (including the patch.
The Patient Portal seems to work now (I still need to check all functions).

Feel free to move this latest post to another ticket, I realized that this is not related to the Patient Portal anymore but more  to v4.1.1 upgrade.

The upgrade broke the CCR / CCD reports on the main emr site.  I’m getting the error below:

Warning: DOMDocument::createElement() : unterminated entity reference Medical Center in /home/infomate/public_html/ccr/createCCRActor.php on line 150

The error does not appear on the Patient Portal when I access CCR / CCD reports.  I’m looking at the links and it seems it is using the same code.

Regards,

Robert

bradymiller wrote on Thursday, September 13, 2012:

Hi Robert,

A nice way to keep track of your customization are using git:
http://www.open-emr.org/wiki/index.php/Git_for_dummies

If figure out how to do this, then can do the following:
1. Integrate your changes into new versions or patches
2. Request your changes to go into the official codebase (if appropriate, such as your deprecated syntax fixes or any other improvement).

For the CCR/CCD reports I can’t reproduce this. What are you using for the name of your facility and what operating system are you running OpenEMR on?

I can see in the script library/sql-ccr.inc getActorData() where there is potential to get differing sql results in portal vs main openemr use:

  $sql2 = "
        SELECT * FROM users AS u LEFT JOIN facility AS f ON u.facility_id = f.id WHERE u.id=?";
        $result[1] = sqlStatement($sql2, array($_SESSION['authUserID']) );

(The $_SESSION is the thing that will differ between portal and main openemr and will only be “correct” in the main openemr i think)

-brady
OpenEMR

bradymiller wrote on Thursday, September 13, 2012:

Also,

Another bug here is that it looks like this code is using the correct facility name sql column (additionally, I don’t think it will pull any of the correct facility info from the patient portal).
To get correct facility need to likely change this line in ccr/createCCRActor.php:

$e_Name = $ccr->createElement('Name', $row1['facility']);

to:

$e_Name = $ccr->createElement('Name', $row1['name']);

(still need to ensure and likely fix the bug where the patient portal isn’t getting the facility information.)

-brady
OpenEMR

anonymous wrote on Thursday, September 13, 2012:

Brady,

After panicking for moment, I have to get down and dirty with the database.
Here’s what fixed my problem.
I created a new site using the v4.1.1 default sql.  Created a new patient and tested the CCR/CCD reports.  To my surprise CCR was working for both the main and patient portal. I’m assuming that the sql was the culprit.

1. I exported individual patient / list / procedures tables from the old site.
2. Dropped the current database (v4.1.0 updated/patched to v4.1.1)
3. Copy the newly created default-database to the current database (like a fresh install)
4. Check current database for correct user and permission
5. Imported all the saved tables from step 1.

Tested CCR on both main and patient portals, both working ok.

Tested CCD on both main and patient portals, both with same errors……

Warning: DOMDocument::save(/home/infomate/public_html/ccr/generatedXml/ccrForCCD.xml) : failed to open stream: No such file or directory in /home/infomate/public_html/ccr/createCCR.php on line 214

Warning: DOMDocument::save(/home/infomate/public_html/ccr/generatedXml/ccdDebug.xml) : failed to open stream: No such file or directory in /home/infomate/public_html/ccr/createCCR.php on line 231

I’m assuming the patch messed-up the sql data. I hope no other user encountered the same problem after running the PATCH.

bradymiller wrote on Thursday, September 13, 2012:

Hi,
Which patch? The 4.1.1 patch 1 does not touch the database except to increment the patch version in the version sql table.

My thought from your initial bug report was that one of the facility entries was screwed up (ie. something bad breaking the script) since the facility info callback only works in the main openemr and not the patient portal (in patient portal it should all be blank).

-brady
OpenEMR

anonymous wrote on Thursday, September 13, 2012:

Brady,

After scratching my head a few more times.  An angel appeared and showed me the way….

I created a folder generatedXml under ccr and “VOILA”!   CCD is now working……

Best regards,

Robert

anonymous wrote on Thursday, September 13, 2012:

A few more glitches on the CCD report………

a solid diamond with a question mark inside ( � )  always appear on the “Contact Info”  cell.

Contact info Home:
                       146 San Jose Ext
                        Dumaguete,�Negros Or.�6200
                        Tel: +1-2251376

Still scratching my head…………………

Robert

manxmen wrote on Tuesday, September 18, 2012:

Hi Brady,

We too plan trying to implenent the Offsite Web Portal using the multiple sites option and will keep you apprised of any issues. Meanwhile, we would appreciate some help and direction with the following:

1: We are interested to use the signed PDF Document Upload feature of the ZHservices OpenEMR Patient Portal but are unable to locate any doumentation or samples as to the format. When we tried to create a PDF Form it asked for PID info.

2: Is it possible to assign multiple users/passwords to a patient record access via the patient portals. We are looking to allow Patients and Physicians to access the records, preferably with different levels of security, or at worst, different user/password info.

Regards
Terry

zhhealthcare wrote on Wednesday, September 19, 2012:

The one video that we failed to do was for uploading the documents to the portal for the patients to fill in.  I will have a video done for that and upload to youtube to share.

We have been swamped with the MU reports for the october 4th deadline and haven’t had much time to follow the forums.  If  we missed anything that we needed to do please email me directly at sam@zhservices.com

Shameem

Reviving the original topic of the patient portal for multi-site. What is the patient portal address for the portal?

same as main site url?site=multisite

I have been trying to get the sudo URL below to work.

https://ehr.myshinynewsite.com/portal/account/register.php?site=serenity

When I try to access the site. The web request fails. @stephenwaite what should be the portal URL on a multisite install?