Problem Printing from OpenEMR 5.0.0

We recently upgraded from 4.2.1 to 5.0.0. The upgrade went successfully. However, since the upgrade, we have not been able to print from OpenEMR. None of the printing that was working prior to the upgrade works now: this includes patient record, encounter records, billing, demographic, insurance, etc.

A review of the error log shows a number of undefined index in some of the files. Sample log file entry:

[Thu Mar 08 16:13:10.608762 2018] [:error] [pid 4637] [client 74.68.90.75:50053] PHP Notice: Undefined index: report_itemizing_temp_flag_and_id in /var/www/html/openemr/library/clinical_rules.php on line 1004, referer: /openemr/interface/patient_file/summary/demographics.php?set_pid=190

[Thu Mar 08 16:12:40.507302 2018] [:error] [pid 5682] [client 69.248.87.209:64270] PHP Notice: Undefined offset: 1 in /var/www/html/openemr/interface/patient_file/report/custom_report.php on line 265, referer: /openemr/interface/patient_file/report/patient_report.php

[Thu Mar 08 16:12:40.486237 2018] [:error] [pid 5682] [client 69.248.87.209:64270] PHP Notice: Use of undefined constant policy_number - assumed ‘policy_number’ in /var/www/html/openemr/library/report.inc on line 90, referer: /openemr/interface/patient_file/report/patient_report.php

[Thu Mar 08 16:12:29.470180 2018] [:error] [pid 5615] [client 69.248.87.209:64266] PHP Notice: Undefined index: Psychiatric Evaluation in /var/www/html/openemr/interface/patient_file/report/patient_report.php on line 395, referer: /openemr/interface/patient_file/summary/demographics.php?set_pid=24
[Thu Mar 08 16:12:29.470195 2018] [:error] [pid 5615] [client 69.248.87.209:64266] PHP Notice: Undefined index: Psychiatric SOAP in /var/www/html/openemr/interface/patient_file/report/patient_report.php on line 395, referer: /openemr/interface/patient_file/summary/demographics.php?set_pid=24

hi @badedokun, do you see anything in the error log immediately after trying to print by pdf? Usually things like Notices are not a show stopper, look for Warnings and Fatal Errors. thank you

Hi Stephen,

Yes. There are Warning and Fatal Error:

[Thu Mar 08 16:13:00.605426 2018] [:error] [pid 5627] [client 69.248.87.209:64275] PHP Warning: require_once(/var/www/html/openemr/library/classes/class.ezpdf.php): failed to open stream: No such file or directory in /var/www/html/openemr/interface/forms/ohp_psychiatric_SOAP/pReport_doc.php on line 67, referer: /openemr/interface/patient_file/report/custom_report.php
[Thu Mar 08 16:13:00.605478 2018] [:error] [pid 5627] [client 69.248.87.209:64275] PHP Fatal error: require_once(): Failed opening required ‘/var/www/html/openemr/library/classes/class.ezpdf.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /var/www/html/openemr/interface/forms/ohp_psychiatric_SOAP/pReport_doc.php on line 67, referer: /openemr/interface/patient_file/report/custom_report.php

Thanks Stephen. I followed the link to GitHub but not sure what I need to do. Can you clarified what needs to be done?

hi @badedokun , the ezpdf class is in a different location so your custom forms have to call $pdf = new Cezpdf(); and shouldn’t require the old location which is causing the errors

Thanks Stephen. I made the change as you suggested and I can print now - thank you. There is another PHP Warning in the log file that I wanted to find out if this is something of concerns or not:

[Thu Mar 08 16:13:18.863345 2018] [:error] [pid 5686] [client 74.68.90.75:50060] PHP Warning: Missing argument 2 for eRxXMLBuilder::getLicensedPrescriberName(), called in /var/www/html/openemr/interface/eRxXMLBuilder.php on line 396 and defined in /var/www/html/openemr/interface/eRxXMLBuilder.php on line 426, referer: /openemr/interface/patient_file/summary/demographics.php?set_pid=190