Fatal Error in Office Ally Eligibility Work Flow Openemr 6.1

Situation
The oa-eligibility ‘update status’

OpenEMR Version
AWS Standard Cloud OpenEMR 6.1

Browser:
I’m using: google

Operating System
I’m using: Ubuntu 20

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

PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, ADORecordSet_mysqli given in /var/www/localhost/htdocs/openemr/src/Billing/EDI270.php:448\nStack trace:\n#0 /var/www/localhost/htdocs/openemr/src/Billing/EDI270.php(448): count()\n#1 /var/www/localhost/htdocs/openemr/src/Billing/EDI270.php(431): OpenEMR\\Billing\\EDI270::requestRealTime Eligible()\n#2 /var/www/localhost/htdocs/openemr/interface/patient_file/summary/demographics.php(1031): OpenEMR\\Billing\\EDI270::requestEligibleTransaction()\n#3 {main}\n thrown in /var/www/localhost/htdocs/openemr/src/Billing/EDI270.php on line 448, referer: https://*****/interface/patient_file/summary/demographics.php

PHP Warning: Undefined array key “status_update” in /var/www/localhost/htd ocs/openemr/interface/patient_file/summary/demographics.php on line 1028

PHP Warning: Undefined array key 1 “status_update” in /var/www/localhost/htd ocs/openemr/interface/patient_file/summary/demographics.php on line 588

PHP Warning: Undefined array key 2 “status_update” in /var/www/localhost/htd ocs/openemr/interface/patient_file/summary/demographics.php on line 579

PHP Warning: Undefined array key 3 “status_update” in /var/www/localhost/htd ocs/openemr/interface/patient_file/summary/demographics.php on line 1028

Note: When you have clicked ‘update_status’, the screen freezes on the dashboard with only the demographics pane open. no errors spit out in the admin->system->logs-> log viewer (main or other).

In EDI270.php

line 429:
$res = sqlStatement($query, array($pid)); //res array declared/defined at this point from what I can see.

line 457:
For the foreach loop
foreach ($res as $row) {
It seems as though the array $res is being passed into array $row. The first error throne “Argument #1 ($value) must be of type Countable|array” seems to suggest the $res array was not properly defined.

Any thoughts on how to fix?

Additionally,
PHP Fatal error: Uncaught TypeError: Unsupported operand types: string - string in /var/www/localhost/htdocs/openemr/src/Services/PatientService.php:737\nStack trace:\n#0 /var/www/localhost/htdocs/openemr/library/patient.inc(1477): OpenEMR\Services\PatientService->getPatientAgeYMD()\n#1 /var/www/localhost/htdocs/openemr/library/patient.inc(1462): getPatientAgeYMD()\n#2 /var/www/localhost/htdocs/openemr/library/clinical_rules.php(2617): parseAgeInfo()\n#3 /var/www/localhost/htdocs/openemr/library/clinical_rules.php(1133): convertDobtoAgeYearDecimal()\n#4 /var/www/localhost/htdocs/openemr/library/clinical_rules.php(813): test_filter()\n#5 /var/www/localhost/htdocs/openemr/library/clinical_rules.php(67): test_rules_clinic()\n#6 /var/www/localhost/htdocs/openemr/interface/patient_file/summary/clinical_reminders_fragment.php(22): clinical_summary_widget()\n#7 {main}\n thrown in /var/www/localhost/htdocs/openemr/src/Services/PatientService.php on line 737

Any thoughts on how to fix?

Change L-448 to $totalCount = count($res ?? []);
in src/Billing/EDI270.php

1 Like

This seemed to open up new errors.

PHP Warning: include(): Failed opening ‘/var/www/localhost/htdocs/openemr/vendor/composer/…/…/src/Billing/EDI270.php’ for inclusion (include_path=’/var/www/localhost/htdocs/openemr/vendor/pear/archive_tar:/var/www/localhost/htdocs/openemr/vendor/pear/console_getopt:/var/www/localhost/htdocs/openemr/vendor/pear/pear-core-minimal/src:/var/www/localhost/htdocs/openemr/vendor/pear/pear_exception:.:/usr/share/php8’) in /var/www/localhost/htdocs/openemr/vendor/composer/ClassLoader.php on line 571,

PHP Fatal error: Uncaught Error: Class “OpenEMR\Billing\EDI270” not found in /var/www/localhost/htdocs/openemr/interface/patient_file/summary/demographics.php:1042\nStack trace:\n#0 {main}\n thrown in /var/www/localhost/htdocs/openemr/interface/patient_file/summary/demographics.php

Most likely caused by the demographic refactor not including the use statement to include the class @robert.down any help.

1 Like

it’s fixed in master, will bring back to the first patch for 6.1.0, commit in pending PR

1 Like

Did you find a solution for this? I’m experiencing the same error with 6.1.

After applying 6.1 patch 1:
Received message. Nothing returned from X12 Partner.
Error from log: Got error ‘PHP message: PHP Warning: Undefined array key “status_update”
/interface/patient_file/summary/demographics.php on line 1028’