SFTP Connection: Could not open local claim file

A few months ago, our healthcare clinics began using the SFTP Submission that @ken created to automatically submit our claims to Trizetto after they were generated and everything was working perfectly well (thanks again Ken, for helping me gain an understanding of how to set that feature up). A few weeks ago though, a large majority of the claims that were created, failed to send, all listing the same error: Could not open local claim file: /var/www/localhost/htdocs/openemr/sites/default/documents/edi/[Date and such here]-batch.txt

I have checked multiple sources in the codebase to see if there may have been an error when changing any fields (there weren’t) and I tried changing where the local directory was a few times to see if anything changed (none). So I am a bit perplexed on the next step, as it isn’t entirely not working as some claims are still being sent and previously all were being sent. So I wonder if anyone has any thoughts or if anyone else that is using this feature ran into this issue and was able to resolve it. Any help would be appreciated.


Additional Information

The main thought I have been having is that the issue scales to the point of the file: X12RemoteTracker.php. On lines 72 - 83, it is searching for the claim file locally first, and if it can’t find it there, it looked in the $GLOBALS['OE_SITE_DIR'] . "/documents/edi/" I think it is possible that it is unable to find the local directory for the SFTP files all of a sudden (SFTP Local Directory file in the second image), and is going through an alternative file path due to apache, though I am unable to find this file path and I can’t explain why the claims stopped being stored locally then.

The company is using the Standard OpenEMR setup from AWS.

Image of the Claim File Tracker with Errors:


Image of X12 Partner’s current file path, this was the original that was working initially.

@Endelis I have implemented same kind of functionality into OpenEMR for one of my client give me access of your server I will check this.

Thank you for replying Nilesh. While your offer is definitely kind, I am not the server administrator of my companies server, nor do I believe this is something that should be done security wise. If you have any questions about the server my company uses, I could ask our server administrator and see if they feel it is logical/secure to share that information or not.

Hi @Endelis, I haven’t ran across this particular issue. A couple things you could check:
1- Does the batch file exist? - Maybe the claim-generator has a bug, and some files are not being created. The files should be in the directory specified by SFTP Local Directory in your Practice Settings.
2- What are permissions on the file?

Ken

Thanks for replying @ken.

I know the files are being created, at least in the sense that they are downloaded to the computer that generated the claim (it is also able to be downloaded directly from the Claim File Tracker which, I may be making an large assumption, would mean it is stored in the file), I will need to double check if they are actually being created and stored in the SFTP Local Directory that was specified in the Practice Settings.

As for the file permissions, I will need to double check. To double check as well, I am going to presume you are referring to the chmod() file permissions that are for the edi folder.

I will try and get those as soon as possible. I really appreciate your help.

-Michael

CH downloads the file and doesn’t open the file on our server I believe, so, the error in their logs tells me they can’t open the file after download.
If I assume correctly, recm opening one of the failed batch files and inspecting the file or even if it can be opened local.

@sjpadgett Thanks for your reply, I have been able to download the batch files that have failed to send and they are filled out correctly, they can also be manually uploaded to the clearing house and work properly. So I think the main challenge may be their inability to actually be “found” for some reason, since its not based on insurance or anything, since the same insurance can fail or work randomly. So I am actively searching for the permissions to see if anything may have changed recently.

I’d be willing to bet this is a clearing house issue. Doubtful a permission problem from one batch file to the next. Generally you’d think if one batch file has issue with permission then all do.

I’d contact CH support and get a better idea of their error.

hi @sjpadgett, from my quick review, there’d be nothing for the CH to review since the batch was never sftp’ed there.

Do we drop the files or does CH pick up

believe we’re pushing them

Sorry, thought CH was complaining.