Prepayments missing from HCFA 1500 form

It was brought to my attention today that the HCFA form is not reflecting prepayment or any payment made by the patient.

I dug into the code to see where the data should be coming from and what I found is this.

  // 30. Balance Due
  // For secondary payers this reflects primary "contracted rate" adjustments,
  // so in general box 30 will not equal box 28 minus box 29.
 if (!hcfa_1500_version_02_12()) {  // Box 30 Reserved for NUCC Use in 02/12
    put_hcfa(56, 71, 8, str_replace('.', ' ', sprintf(
        '%8.2f',
        $clm_total_charges - $clm_amount_paid - $clm_amount_adjusted
     )));
  }

These three variables are set to equal 0.

Then I followed $claim->patientPaidAmount(); And this is still zero.
@stephenwaite @sjpadgett

Any pointers before I go and get my hip waiter?

hmm, this snippet looks to be for pre hcfa 1500 02 12 which doesn’t apply in current versions as I think 1500 02/12 is now defaulted.

Ok, but I am on the hunt so I started with the gen_hcfa_1500.inc.php. That is where the snippet is from.
Which file should I be looking?

In the !hcfa_1500_version_02_12() there is not a reference to box 29. I have not dug in deep enough to know which is delivering the data.

Not sure. Been awhile since i’ve been in that code but, i’ll look real quick. Any idea what User Groups use is?

L581 gen_hcfa_1500.inc.php // 29. Amount Paid

Plus I think if a pre-payment hasn’t been applied/posted then it will just carry forward as a patient balance. Also it seems reasonable this is an insurance claim so if a patient payment hasn’t been applied against the insurance balance then will not been reflected in box 29.

@sjpadgett

That sounds good for the US. But in other parts of the world, the payer would like to see the amount that the patient has paid and it is required to be in that box.

  $clm_amount_paid = $hcfa_proc_index ? 0 : $claim->patientPaidAmount();
  $clm_amount_paid = $claim->patientPaidAmount();

Even when I change the line to the second one, the box 29 is still 0.00 and I know the patient has made payments.

Yes but, how were the payments applied? Were they applied to insurance balances or just applied as a payment against patient balance? I’ll take a look at code for ya and see how that is calculated…That should tell the story.

The steps that are taken to apply what the patient has paid.

  1. Open Batch Payments
  2. Search Payment
  3. Enter PID or name in Payment From and set paying Entity to Patient
  4. Select prepayment from the Undistributed funds box
    That goes over to the Edit Payment window.
  5. Go down to the encounter the payment is to be applied and enter payment in the second column label payment.
  6. In the drop-down box change select patient as payer.
    Select Modify Payment. And save the change.

The amount applied in this manor shows in the patient ledger

This amount needs to be on the hcfa
From what I can tell so far is that the code does not take these payments into consideration.

Looks like there needs to be a method to get this payment from the ar_session table.

Seem if posting to Primary then only copay is calculated. I’m having a hard time wrapping my head around this. Is there an item in ar_activity reflecting the payment and if not see if there is anything in payments.

I understand that is why I like talking these things out. If you go in the system and create an encounter and fill out the fee sheet for that encounter and then take a prepayment for the patient. The prepayment does not show in the Payment Record at all because it is not against anything is my guess as to how the system is designed.

This is the ar_session table where the prepayment is held in limbo.

The prepayment won’t show unless you go to Batch Payments and look for the payment.

Then the payment is distributed

After this step the payment is fully applied and the status is changes. Now the payment is recorded in the ar_activity table

No this payment needs to be gotten and placed on the claim form in box 29.
That is what I am working on.

Okay i’m satisfied I know where the problem is but i’m always leery messing with billing code. I need to step through code and figure out best way to bypass posting to Primary for this type of payment(only copay is calc’ed). Code will not touch patient payments unless as a secondary posting. Don’t know why yet.

Now, I have another issue. The screenshots that I posted. The $150.00 payment shows on the hcfa.
This is my demo system where the payment shows on the hcfa. Now I have to go try to figure out where the two systems are different. Production does not work but the dev works. @!@#%^&

UPDATE:
This was a misunderstanding of how the data is populated. If there is no primary insurance the amount prepaid shows up. @stephenwaite could you please step in and help me with getting this to work for prepayments in the system. Because the change we made below fills this box for everyone and caused a lot of problems. I humbly ask.

The issue is you probably don’t have Primary payer selected in claims on you dev system.

Apparently you can’t post a patient payment against Primary payer. Only copay.
re: Best I clarify. It looks like it is not expected that a patient payment would be made against Primary except copay.

That is correct. Now need to track that down

Hey, could you tell me what line of code this is?

Thanks!

I have to find it again. I’ll get back to 'ya in a little while.

Start here for the code that is offending you:)
L124 if ($this->payerSequence() != ‘P’) {
of library/billing/src/Claim.php
There are several conditionals testing if payor is Primary before patient payments are returned. Evidently Billing expects patient payments against secondary payor’s rather than Primary.

A thought may be to add a flag(Global) to the conditional to allow all patient payments to be summed and reported. This worked for me however, some due diligence should be paid to if this may blow up later in billing. My first inkling is no.
if ($this->payerSequence() != ‘P’ || $GLOBALS[‘allow_this’]) {