Editing Statement

arnabnaha wrote on Monday, July 22, 2013:

Hi david, I need the statement file badly changed…can I see yours to get an Idea for my clinic?
my email id is: superarnab@gmail.com

hitechelp wrote on Tuesday, July 23, 2013:

Updated version to let you insert a billing phone number that is different from default facility.

Those using the previous version may have noted that entering a billing phone number after the contact’s name on the “Billing Attn:” line in the Facilities section causes that number to show up in your claims and obviously, we don’t want that to happen.

https://docs.google.com/file/d/0B6_qxpCoBHlYaGowU3VrdkVSWXM/edit?usp=sharing

fsgl wrote on Tuesday, July 23, 2013:

David,

Access to the Google documents is restricted even with a Gmail account.

It would be great if you could copy the contents to this thread.

bradymiller wrote on Thursday, July 25, 2013:

Hi David,
Even better to get the code on git/github. Check out this tutorial:
http://www.open-emr.org/wiki/index.php/Git_for_dummies
-brady
OpenEMR

Hi Rod,
I have been trying in vain to edit the Remit To address. I have looked thru the sites/default/statement.inc.php file and follow your instructions to;
“Edit the file sites/default/statement.inc.php (or substitute an appropriate site ID for “default”).”
I only end up deleting the city in the report when I substitute the actual citys name for the word ‘city’ below;
Line 530 in 5.0.1-6 version
// Facility (service location)

$clinic_name = "{$row['name']}";
$clinic_addr = "{$row['street']}";
$clinic_csz = "{$row['city']}, {$row['state']}, {$row['postal_code']}";

Thus this is obviously not what you meant by edit what is in brackets.
Could you please guide me as to what exactly to edit.

Thank you,

Henry

have you seen this recent thread Beef with the patient statement

Hi Stephen,

Thank you for responding.
Read thru this. I am not a programmer. I just want to change the Remit To address, as it is not the same as our Facility address. Reading Ron’s post it would appear to be relatively simple, just edit the info between the brackets. I just want to know where exactly to do this in the file.

Thank you,

Henry

@hamd
To answer your question, find these lines in the statement.inc.php file.

// Billing location modified by Daniel Pflieger at Growlingflea Software
    $service_query = sqlStatement("SELECT * FROM `form_encounter` fe join facility f on fe.billing_facility = f.id where fe.id = ?", array($stmt['fid']));
    $row = sqlFetchArray($service_query);
    $remit_name = "{$row['name']}";
    $remit_addr = "{$row['street']}";
    $remit_csz = "{$row['city']}, {$row['state']}, {$row['postal_code']}"; 

You can hard code in your remit too address this way:

// Billing location modified by Daniel Pflieger at Growlingflea Software
    // $service_query = sqlStatement("SELECT * FROM `form_encounter` fe join facility f on fe.billing_facility = f.id where fe.id = ?", array($stmt['fid']));
    //$row = sqlFetchArray($service_query);
    $remit_name = "The Name Where the Bill Goes";
    $remit_addr = "123 A St ";
    $remit_csz = "YourCity, ST, 96857"; 

This should work.

Hi Sherwin,

Those exact lines can only be found in github master branch PR 10/21/2018 by Daniel Pflieger.
So are you saying that I should copy and substitute that statement.inc.php file in github for the one that my 5.0.1-6 system has now, then make those modifications?
From what I was reading in the Forum (Statement.inc.php file incorrectly sets the billing facility to the same value of service facility regardless of what is entered in Admin->Facility) this is the same problem he was trying to resolve in 4/18 -5/18, i.e. different facility and billing addresses.

Sorry to sound dense, but I want to be sure of what I’m doing.

Thank you,

Henry

Hi Sherwin,

It appears that there are 2 places that have the above code in the statement file, lines 146 and 545.
Do they both need to be modified.

Thank you,

Henry

My apologies, I was in the wrong version.
You do need to find the first instance of $remit_name.

Which the first instance is line 137.

You can change these lines from this:

  <td style="margin:auto;"><b>'.$label_remitto.'</b><br />'
  .$remit_name.'<br />'
  .$remit_addr.'<br />'
  .$remit_csz.'
  </td>

To this:

  <td style="margin:auto;"><b>'.$label_remitto.'</b><br />'
  .'My Billing location Name <br />'
  .'123 Any St NW <br />'
  .'Kansas City, NB, 98765
  </td>

Hi Sherwin,

The line at 134 is // Billing location
The line at 135 is $ remit_name = $clinic_name;
The line at 136 is $ remit_addr = $clinic_addr;
The line at 137 is $ remit_csz = $clinic_csz;

I do not see the line that goes before it that you noted.

Thank you,

Henry

Hi Sherwin,
The first line is at line 422. Is this where these changes belong.

Thank you,

Henry

Henry, what version openemr are you trying to modify statement?

Hi Jerry

It’s 5.0.1-6

Thank you,

Henry

@hamd,
In 501 version statement you will find two places that has the code block(most likely L128 and L532:

$clinic_name = “{$row[‘name’]}”;
$clinic_addr = “{$row[‘street’]}”;
$clinic_csz = “{$row[‘city’]}, {$row[‘state’]}, {$row[‘postal_code’]}”;

Replace above lines with below:

$clinic_name = “Your remit clinic name”;
$clinic_addr = “123 street name”;
$clinic_csz = “City, State, Zip”;

One block is for text statement and the other is for the HTML statement.

I believe Rod meant between curly braces and not brackets. Still this is not a complex expression(php) the way you wish to use so, leave out any braces or brackets.

Let me know if this gets you there.

Hi Jerry,

If both those lines are changed, then both Facility and Remit To are changed. This is what Daniel was trying to fix. He was trying to change one without the other If you think of something else that might work, please let me know.

Thank you,

Henry

Hi Jerry,
In Daniel’s post he says that his new statement file works in version 500. That he was going to test it in 501. Can the github file be substituted for the current one?

Thank you,

Henry

hmm, really. Okay assuming we are using the same statement from 501, i’ll just go ahead and modify and post it here. I’ll try to get to in next hour or two. email me what you want for remit address. sjpadgett@gmail.com

I don’t see a reason it won’t. Try and let me know.