Patient statement in v5.0.0(3)

Hi

I am Using OpenEMR V5.0.0(3) and I tried to generate statement for patient balance but I am not able to download statement in PDF format and there is no option for Txt (TEXT) file download, and also I tried the same thing in v5.0.0 then only PDF download available and no option for Txt (TEXT) file download. So, Anyone can help as I have to send statement in two days,

Ameet

@asharma should work for you by going to Fees->posting, entering the chart id of the person and click search, then can download

I did it but when I click on PDF Download Selected statement then it give error like. this

@asharma, try with firefox :slight_smile:

when I tried on Firefox and Chrome then again give me error like this,

@asharma can you check your php error log?

where I have to check php error log

@asharma it’s on the server, are you using a hosting company?

Hi
I am uploading log file. Can please check and let me know this is correct file and what is error ?
Thanks
Ameet
log.txt (7.3 KB)

PHP Fatal error:  Uncaught <span style="color: #AA0000; font-weight: bold;">\nERROR n\xc2\xb06</span><br>\nFile : /var/www/openemr/library/html2pdf/html2pdf.class.php<br>\nLine : 1345<br>\n<br>\nImpossible to load the image <b>/sites/default/images/visa_mc_disc_credit_card_logos_176x35.gif</b>\n\n  thrown in /var/www/openemr/library/html2pdf/html2pdf.class.php on line 1345, referer: https://synergyehr.com/interface/billing/sl_eob_search.php

@sjpadgett is the resident expert

For now to get your statements printed(if needed) turn of printing with image in administration->Globals. Did you recently upgrade browser?

@asharma @stephenwaite Yep it is broken and I bet it is path to file. I added a uri global to site directory a while back but don’t know what version OpenEMR it got in,if at all. I’ll patch my dev version to see if works and let you know.

@stephenwaite @asharma Okay, this is an issue that has concerned me since I looked into cookie security. In this case (and my server config) the site is configured to alias into root directory causing webroot to be empty so that any uri’s relying on webroot to build out a path finds the path invalid. For example, http://synergyemr/interface/… will cause webroot to be empty causing file path to be /sites/default/images/visa_mc_disc_credit_card_logos_176x35.gif instead of expected openemr/sites/default/images/visa_mc_disc_credit_card_logos_176x35.gif etc…

Dealing with this may prove troublesome, especially since more and more sites are adopting SSL and multi site configurations possibly causing domain to be reported as localhost.(cross origin or certificate violations). I’m not real spiffy on server stuff and may be missing something so correct me if so. A solution doesn’t readily come to mind …yet!

@brady.miller You were around when webroot was implemented, is this an issue or am I missing something? I just find it hard to believe this comes up now. I think in most cases browser will correct url but in cases browser can’t intervene as with file uri’s, we’re stuck.

@asharma @brady.miller @stephenwaite I found a solution to fix this particular problem and have tested on Windows and Linux Ubuntu but will leave to the integrator’s as to if this should be a patch or not. Seems to me there was a reason this image was being loaded via a uri and not a file path where as the practice logo is using a file path! What ever the case, the issue with empty webroot needs attention. Apparently Widows will resolve the uri but not Linux.
The image path in openemr/sites/default/statement.inc.php around lines 361 and 1000, need to change from

$practice_cards = $GLOBALS[‘webroot’]."/sites/" . $_SESSION[‘site_id’] . “/images/visa_mc_disc_credit_card_logos_176x35.gif”; to

$practice_cards = $GLOBALS[‘OE_SITE_DIR’] . “/images/visa_mc_disc_credit_card_logos_176x35.gif”;

Hope this helps.

@sjpadgett , @stephenwaite Thanks it is working fine.

1 Like

@sjpadgett , @stephenwaite , Is it possible to generate statement on Text Format as this system generate statement individual for each date of serve for single patient.

thanks for the bug report @asharma, i remember @teryhill reporting this awhile back, did you find a fix for this Terry?

hi @asharma, while we debug the duplicate statements if you change the setting to plain text in Admin->Globals->Billing->Statement Appearance you can download as text

Are you talking about the summary? Are you saying the same encounter statement is dup’ed?

yes, so say the person has 2 visits, first invoice lists first visit, 2nd invoice has both visits