Upgrade from 4.2.0 to 5.0.0(6) - No Rendering Provider in X12 File

We upgraded OpenEMR from 4.2.0 to 5.0.0(6). We have an issue with generated X12 billing file missing Rendering Provider NPI and Taxonomy values. Researching the issue I found that the gen_x12_837.inc.php which is generating the X12 file is retrieving provider ID from the form_encounter table and the value in that filed is 0. I spent a lot of time trying to figure out when is this value being saved as 0 in provider_id in form_encounter table but no luck. I have to update this field value to the correct provider_id manually in the table so that the generated X12 file is not missing the provider details.

OpenEMR Version
OpenEMR 5.0.0(6)

Browser:
Chrome

Operating System
Ubuntu

hi @smirzaoe, on the patient encounter form inside the encounter being billed, who is the form authored by, is it the rendering provider? Inside the fee sheet for this encounter who is the rendering provider? thank you

Rendering Provider in the fee sheet is “Administration, Administration” which is the default provider when the provider_id = 0.

My problem is that I am not able to re-create this problem. When I create the encounter as a provider and it shows the correct rendering provider, however, the provider_id is becoming 0. I am not able to figure out what and when the provider_id is being updated to 0. Also, it is not consistent.

hi @smirzaoe, so you have other users who may be creating encounters through selecting @arrived on the appointment in the calendar?

That’s a very good question. Yes, that’s how we been doing. One user creates the encounter and the user like provider will enter the fee sheet and templates. That’s how we been doing before upgrading to 5.0.0. Is that a problem now?

Thanks!

Pretty sure that was a bug back then @smirzaoe, have you thought about upgrading all the way to 5.0.1(3) which is the current release?

Yes, I have been trying to upgrade my test server from 5.0.0(7) to 5.0.1 and I got this error “PHP version needs to be at least 5.6.0.”. I seems have no luck fixing test server.
Now my test is broke. May be I will open a new topic for this issue.

1 Like

Just to close this thread, I was able to fix this issue by making a small change in the FeeSheet.class.php file.

I replaced the below condition at line number 1155:
if (isset($main_provid) && $main_provid != $this->provider_id) {

with this:
if (isset($main_provid)) {

Basically removing the second part of the condition.