growlingflea wrote on Wednesday, July 09, 2014:
Printing Code Descriptions on Invoices
Today I received a question from a user regarding invoices and printing descriptions of codes on the invoice. As a default, the invoice only prints the code without a description. This can be confusing to the casual observer. The following code changes will help the user.
--- a/interface/billing/sl_eob_search.php
+++ b/interface/billing/sl_eob_search.php
@@ -203,7 +203,7 @@ if ($INTEGRATED_AR) {
foreach ($invlines as $key => $value) {
$line = array();
$line['dos'] = $svcdate;
- $line['desc'] = ($key == 'CO-PAY') ? "Patient Payment" : "Procedure $key";
+ $line['desc'] = ($key == 'CO-PAY') ? "Patient Payment" : $value['code_text'];
$line['amount'] = sprintf("%.2f", $value['chg']);
$line['adjust'] = sprintf("%.2f", $value['adj']);
$line['paid'] = sprintf("%.2f", $value['chg'] - $value['bal']);
--- a/sites/default/statement.inc.php
+++ b/sites/default/statement.inc.php
@@ -194,7 +194,7 @@ $out .= "\n";
// be specified in the order used.
//
foreach ($stmt['lines'] as $line) {
- $description = $line['desc'];
+ $description = substr($line['desc'],0,30);
$tmp = substr($description, 0, 14);
if ($tmp == 'Procedure 9920' || $tmp == 'Procedure 9921')
$description = xl('Office Visit');
Replace the lines that have a single '-' with the line that has a '+'. The two files of importance are the /interface/billing/sl_eob_search.php and /sites/default/statement.inc.php
The following attachments show the before-and-after results of the code change.