Billing / HCFA Form > PHP Deprecated: usort() Errors

billing

(TechMed) #1

I tried quiet few different methods to work around this function usort so it doesn’t get called statically but PHP errors are still coming up so finally posting here hopefully you can help me:)

Situation
When client is filing a Billing claim: Fees > Billing Manager > Billing Status = Unbilled > Check off Patient Encounter(s) > HCFA Form > CMS 1500 PDF| incl FORM | TEXT > Validate and Clear | Validate Form.

Screen throws bunch of error messages incl. "PHP Deprecated: usort() expects parameter 2 to be a valid callback, non-static method OpenEMR\Billing\HCFA_Info::cmp_hcfa_info() should not be called statically in [OpenEMRdir]/src/Billing/HCFA_1500.php on line 119 " This HCFA Form issue unfortunately happens to my client all the time now.

User Issue: HCFA/CMS form files do get created on the server which then I have to deliver manually to my client though since a user is not capable to save these CMS 1500 files to his/her desktop due to received on-screen PHP Deprecated / usort errors.

HCFA_1500.php > Line 119 :
// Sort the entries to put them in the page base sequence.
usort($hcfa_entries, array(‘OpenEMR\Billing\HCFA_Info’, ‘cmp_hcfa_info’));

OpenEMR Version
5.0.2

Browser:
Chrome 76.0.3809.100 /Firefox 68.0.2

Operating System
Centos 7.4 / Linux / PHP 7.2| 7.3

Logs
Billing Manger GUI > View Log > there are No errors:

Generating HCFA claim 50-1100 for [PATIENT NAME}  on 2019-08-23 10:11. 
error_log output:
PHP Deprecated:  usort() expects parameter 2 to be a valid callback, non-static method OpenEMR\Billing\HCFA_Info::cmp_hcfa_info() should not be called statically in [OpenEMRdir]/src/Billing/HCFA_1500.php on line 119 

Any help, lead on this issue is appreciated. Thank you.

(Stephen Waite) #2

hi @TechMed, unable to reproduce on https://ten.openemr.io/d/openemr/interface/login/login.php?site=default

remember working on this and according to https://www.php.net/manual/en/language.types.callable.php and specifically example 1 it appears it should be fine since php 5.2.3


(Stephen Waite) #3

hmm, on second thought it appears that openemr/HCFA_Info.php at master · openemr/openemr · GitHub isn’t declared as static


(TechMed) #4

Hi @stephenwaite, thank you for looking into this and mentioning it doesn’t appear declared as static. I also tried and couldn’t reproduce it on a demo site the other day. I will continue to troubleshoot this further. Thanks.


(Stephen Waite) #5

sure, naturally was about to test by adding static to that method


(Stephen Waite) #6

you might just have to turn errors off for now to get it working, https://www.open-emr.org/wiki/index.php/FAQ#What_are_the_correct_PHP_settings_.28can_be_found_in_the_php.ini_file.29.3F


(TechMed) #7

@stephenwaite I did turn errors off in php.ini as referenced, restarted HTTP server but unfortunately this didn’t get rid off errors. Then it hit me about Admin Globals logging settings I did turn on bunch during/post the OpenEMR upgrades so I did disable all the loggings incl. billing log debugging option and that did it! Ufff! I’m able now to generate CMS claim files without any PHP errors. Thank you for your help and leading me onto this. Next step, over this weekend I will troubleshoot each logging option and get down to which exact one was causing this issue. I will follow up with my findings. Thanks again.


(Stephen Waite) #8

oh yeah, @sjpadgett’s new feature, Admin->Global->Logging->User Debug


(TechMed) #9

Confirmed @stephenwaite Without turning on any other loggings but just that one: User Debugging Options (All or Display Application Errors Only) will generate back those errors "PHP Deprecated: usort() " for me. Is that a normal behavior? While I do expect a debugging log to spit out bunch of warning/ debug log messages but I wouldn’t expect for program to error out… I’ve tried to recreate these errors on a demo site (demo.openemr.io/openemr) but I couldn’t, no such PHP errors were produced. Thanks.


(Stephen Waite) #10

hi @TechMed, yes. When the errors display it can interrupt the php script like in this case it prevents the claim form from being downloaded.


(TechMed) #11

Right, I see -thanks @stephenwaite