Pulling in ERA's creating duplicate charges


juggernautsei wrote on Thursday, June 30, 2016:

Please see attachment. The ERA was uploaded and posted automatically. It somehow created it’s own charges to apply the payment to.


juggernautsei wrote on Wednesday, July 06, 2016:

are there any billing people on this forum that can assist with how the program is suspose to post payment?

Is this correct in how I am seeing the payments.


sunsetsystems wrote on Wednesday, July 06, 2016:

Looks like you already have a 90834 so I don’t know why it’s adding another. The logic is in interface/billing/sl_eob_process.php. Looks like some debugging work is needed.



juggernautsei wrote on Wednesday, July 06, 2016:

Thanks Rod!

I see that the Integrated AR has been removed from the system.

But what would help is the why? 5 minutes into the video he says without it we are powerless.

Such as I am powerless unless I can figure out the why.

In searching for the why, I did a search through the files for the phrase “Add by Ins1” to see if notes were left as to what process this is preforming. Nothing came up. I only found the file in the era folder listing all the errdetail.

But this does not help me with the why, yet.
Light please

The clearing house is Claim MD. Is anyone else using ClaimMD with success?

Are all ERA’s the same?

This issue did not exist in the previous version 4.2.0. We leaped from 4.2.0 to 4.2.2


juggernautsei wrote on Thursday, July 07, 2016:

Why is the below code executed to create the entry that I am seeing on the patient’s fee sheet?

        // If the service item is not in our database...
        else {

            // This is not an error. If we are not in error mode and not debugging,
            // insert the service item into SL.  Then display it (in green if it
            // was inserted, or in red if we are in error mode).
            $description = "CPT4:$codekey Added by $inslabel $production_date";
            if (!$error && !$debug) {
        arPostCharge($pid, $encounter, 0, $svc['chg'], 1, $service_date,
          $codekey, $description, $debug,'',$codetype);
                $invoice_total += $svc['chg'];
            $class = $error ? 'errdetail' : 'newdetail';
            writeDetailLine($bgcolor, $class, $patient_name, $invnumber,
                $codekey, $production_date, $description,
                $svc['chg'], ($error ? '' : $invoice_total));


In the screenshot it is clear that the fee sheet has the entery and the line 282 seems to be checking for entries already in the table.

 $debug = $_GET['debug'] ? 1 : 1; // set to 1 for debugging mode

Not sure what I am looking for in the debug mode. No notes on what it suppose to produce.


sunsetsystems wrote on Thursday, July 07, 2016:

Yes that’s the question, why is that code executed. Seems it should not be. Debugging will start with looking at why the code decided to do that.

Debug mode means database updates are skipped. It does not give you more information, rather makes tests repeatable.



juggernautsei wrote on Thursday, July 07, 2016:

Rod that was a real big help.

I commented out the code since there is not a real purpose for the entries. I removed all the entries from the billing table. Saved them just in case. I’ll have them run it in production and post back the results.


sunsetsystems wrote on Thursday, July 07, 2016:

It really needs to be debugged. That logic serves a purpose when the insurer does recoding, which does happen.



juggernautsei wrote on Thursday, July 07, 2016:


I wish I could figure out why the code is doing what it is doing but without a decent conversation about it. It is going to take a while to debug it and production has to go on.

I heard back from the biller and she said that everything was back to normal. I still have the ERA that she was loading and the code in my dev box.

Can you give me more details on “That logic serves a purpose when the insurer does recoding” do tell.


sunsetsystems wrote on Thursday, July 07, 2016:

You’ll probably need a pro to debug this for you. But if it used to work then something must have changed. What might that be?



sunsetsystems wrote on Thursday, July 07, 2016:

Oh never mind, I missed your post about moving from 4.2.0 to 4.2.2. Something about that change then.


juggernautsei wrote on Friday, July 08, 2016:

From what I can see, the integrated AR is what changed between 4.2.0 to 4.2.2. But I am sure that the pro that developed this process could tell me more than what I am preceiving as what changed. It is going to take me some time to learn this section of the program since I have not worked on the payment processing very much. As you know the learning curve can be high for sections of code. I’ll post back what I find as I go through the code looking for clues.


juggernautsei wrote on Monday, July 11, 2016:

I am going to make public notes here to work through what this is doing as a way of working out what is causing the entries into the fee sheet when it should not be.

I have read/worked backwards through the loop and see that line 273 says this loops for each service item in this claim. so that begins the process that is going to eventually make the enter. So to my understanding the code is beginning the process of looking through each of the service items from the ERA.

Lines ~283 is the first check in the for items not matching the invoices.


I’m having the same problem, running v4.2.2. I have no experience with any prior versions because I wasn’t billing at that time.
I didn’t fully grasp what you mentioned about integrated a/r.
Do you know if this all got worked out with the v5.0 upgrade?
Or, have you gotten any further in figuring out the problem?
Paul Talerico


Once I got the line ending worked out I am posting era’s from Nordian Medicare and Office Ally (they send Blue Shield to me) and have not had any problem. Is Claim MD using some weird tag, do you have the CPT4 service item that they are trying to create in your CPT4 procedure table? I have spent days going through these ERA routines and know them fairly well. I will try to help if you need it.
Kim Weesner
Director HIT
Frank Rubino MD Inc


I am not sure if I can add anything to this conversation. I don’t remember the resolution to the issue. That project went away. I would only suggest if you have the opportunity to upgrade to 5.0 to do so.

I’ll look to see if I still have this code. And if there was a solution other than to comment out those lines.