Date of service in superbill

gutiersa wrote on Saturday, April 26, 2008:

When we print our superbills (we use an outside billing company while we set up openemr for our billing) the date that gets printed is the date of posting, not the date of service. We usually post our visits the next day, or several days later. How can I get openemr to print the date of service and not the date of posting??

gutiersa wrote on Wednesday, June 11, 2008:

got it. In /openemr/library/report.inc change

    $sql = “select billing.*, u.id, u.fname, u.mname, u.lname,CONCAT(u.fname,’ ‘, u.lname) as provider_name, u.federaltaxid  from billing LEFT JOIN users as u on u.id = billing.provider_id where pid=’” . mysql_real_escape_string($pid) . “’ and encounter = '” . mysql_real_escape_string($encounter) . “’ and activity=‘1’ order by date”;

to

//modified by Dr. Gutierrez to include service date
    $sql = “select billing.*, u.id, u.fname, u.mname, u.lname,CONCAT(u.fname,’ ‘, u.lname) as provider_name, u.federaltaxid, form_encounter.date as svc_date from billing LEFT JOIN users as u on (u.id = billing.provider_id) LEFT JOIN form_encounter on (form_encounter.encounter = billing.encounter) where billing.pid=’” . mysql_real_escape_string($pid) . “’ and billing.encounter = '” . mysql_real_escape_string($encounter) . “’ and activity=‘1’ order by date”;

And in /openemer/interface/reports/custom_report_range.php change:

                    echo “<td class=text>” . $b[‘date’] . “</td>”;

to

                    echo “<td class=text>” . $b[‘svc_date’] . “</td>”;

both changes are needed