Can't Generate X12 files after updating to 7.0.1.1

Situation
It’s not letting us make x12 files.

OpenEMR Version
I’m using OpenEMR version 7.0.1 Path 1

Browser:
I’m using: Firefox and Chrome

Operating System
I’m using: Ubuntu 20.04 and 22.04

Search
Did you search the forum for similar questions? yes

Logs
Did you check the logs? yes
Was there anything pertinent in them?

Apache Logs

[Fri Jun 02 13:46:53.443390 2023] [php:error] [pid 5425] [client 181.41.206.193:50756] PHP Fatal error:  Uncaught Error: OpenEMR\\Billing\\X125010837P::genX12837P(): Argument #7 ($edicount) cannot be passed by reference in /var/www/emr.heartnd.com/src/Billing/BillingProcessor/Tasks/GeneratorX12.php:79
Stack trace:
#0 /var/www/emr.heartnd.com/src/Billing/BillingProcessor/Tasks/GeneratorX12.php(167): OpenEMR\\Billing\\BillingProcessor\\Tasks\\GeneratorX12->updateBatchFile()
#1 /var/www/emr.heartnd.com/src/Billing/BillingProcessor/Tasks/AbstractGenerator.php(78): OpenEMR\\Billing\\BillingProcessor\\Tasks\\GeneratorX12->generate()
#2 /var/www/emr.heartnd.com/src/Billing/BillingProcessor/BillingProcessor.php(140): OpenEMR\\Billing\\BillingProcessor\\Tasks\\AbstractGenerator->execute()
#3 /var/www/emr.heartnd.com/src/Billing/BillingProcessor/BillingProcessor.php(91): OpenEMR\\Billing\\BillingProcessor\\BillingProcessor->processClaims()
#4 /var/www/emr.heartnd.com/interface/billing/billing_process.php(33): OpenEMR\\Billing\\BillingProcessor\\BillingProcessor->execute()
#5 {main}
  thrown in /var/www/emr.heartnd.com/src/Billing/BillingProcessor/Tasks/GeneratorX12.php on line 79, referer: https://emr.heartnd.com/interface/billing/billing_report.php

Please paste them here (surround with three backticks (```) for readability.
You can also turn on User Debugging under Administration->Globals->Logging User Debugging Options=>All

sorry about that @darkdecoy , here’s a fix

1 Like

Thanks the fix worked on our server

We have a couple clients that use OpenEMR and I was wondering what is best way to help with testing new releases and is there any automated used in the testing process? Thanks.

thanks @darkdecoy , there’s no automation for these 837 generations, there were some last minute additions to the patch to support direct send to insurance patient segments but thought had tested the default setup well but apparently missed this.

your clients may need this fix as well

you can setup your own test environment and keep up with changes in the master branch using the easy dev environment if you’d like

there is automated testing for a few important pages which you can see in the repo actions

repo testing info

@stephenwaite I ran into this issue, and thanks for the fix. The IDE showed a red underline on line 76. To make the red line go away. It suggested this change.

 $partner = $claim->getPartner(); //this variable was added
    $segs = explode(
        "~\n",
        X125010837P::genX12837P(
            $claim->getPid(),
            $claim->getEncounter(),
            $$partner,  //here a variable variable is being used and is accepted as good code.
            $log,

I tracked it back to the PHP manual.
https://www.php.net/manual/en/language.variables.variable.php

What are your thoughts?
Best!

hi @juggernautsei , not sure what to make of that :slight_smile:

would refer you to the rel-701 branch and the upcoming patch 2 will have this all patched up for everyone