I wish to capture the raw X12 data generated by OpenEMR 4.1 . What folder can I capture it from? When is it deleted? Is there an export X12 data function that sends it to a text file on the server? Thanks !
When you generate an X12 batch it offers if for download. The file name is presented as ‘batch_datetime.txt’ or similar format. You can save this file anywhere locally and then you use it to upload to your clearing house. That is the RAW file. It also saves a copy in the
sites/[sitename]/edi/
directory under that same batch name. It is never removed by OpenEMR.
Tony www.mi-squared.com / @tonymi2 oemr.org / @OEMR_org
Claim files are archived in the sites/default/edi directory on the server (or substitute the appropriate site ID for “default”). They are not automatically deleted.
I am using openemr 4.1 v7. Since I upgraded to 4.1, Office Ally has been rejecting my claims when I submit X12 files from this folder. Support says the reason is due to an empty space before the ISA segment. But when I look back, there isn’t an empty space nor line for that matter. At present, I usually cut and paste to a new text file before I send. Then there isn’t a problem. Anyone has this problem?
I cut and paste to a new document because I cannot send the file to Office Ally directly. They reject it. I know that there can be characters in the file that are not displayed. But this problem wasn’t there in the 4.0 version. And since I cannot identify what it is that is causing the error since the upgrade, this is the work around that I am using. I have been trying to figure it out for 2 months. During that time, I couldn’t bill. Since I cut and paste, my billing has gone through and I have caught up. If I remember correctly, Kim Wisner who worked on this was able to send to Office Ally and Medicare without problem. I don’t know how she could since I should be using the same X12 that she has uploaded to git.
Is there any name or extension convention for files with Office Ally? Do you change the name in any way? When you get the file from openemr, do you save or “save as”?
Open a “bad” file in a word processor that allows you to select “View/Show non-printing characters”. Still nothing?
I gave Kim a program called “era distiller” to allow her to use Office Ally era’s (835) files with OpenEMR, as she apparently does not have an option of receiving ERA’s without line returns. At worst, the program can be modified to strip excess spaces on any files, but apparently, when you view the file, the spaces do not exist. Thus, that little program can allow you to copy, strip, and paste multiple file contents into new files. If it truly is some other little bugger-boo that is fixed when you copy and paste, then that should fix it, and be a little more convenient of a work-around. http://www.oemr.org/phpBB3/viewtopic.php?f=5&t=111
Any chance you can set up a fake facility, fake patient, and fake billing info in your running application, create a file and then post it somewhere for us to look at the file exactly as it comes out of the EMR?
Look at a file openemr/library/gen_x12_837.inc.php.
about line 12, find $out = ‘’; Make sure there is no space between the single quotes.
About line 25, look for this:
$out .= “ISA” .
Is there a space like $out .= " ISA" . in yours, or is there another line in the code before this that says $out = except at line 12?
@developers: Can $out be initialized at line 25 without line 12 if this is?
All I can think of is to suggest that you use a true text editor program, or a different one, to prepare your cut and paste. Maybe you could open a test file with a “hex editor” or something. For example, in Linux there is a KDE program called Okteta, where “The data is displayed in two variants: as the numeric values of the bytes and as the character assigned to the values.” For one of my batch files, it shows:
49 53 21 2A 30 30 2A for “ISA*00*”
If I put a space in before ISA, it shows:
20 49 53 21 2A 30 30 2A for " ISA*00*"
I am guessing that somehow your software or method is inserting something that is interpreted as a space. It may not show in Okteta because there may be some “magic” bytes that programs use in files to convey information such as type of file. Also, I believe the x12 format calls for ASCII files or something. I cannot recall the details of all that cryptic file format stuff, but there are different formats and encodings. It may be a rabbit trail, but since it has been two months, you might look into it. Also, try to get a better analysis from Office Ally since the “empty space” might actually be their programs not seeing what they want.
I have been busy chasing after Medicare. I got it settled today. I am still using their PCAce32. I will test the batch file from openemr later on and hopefully, it goes through. As for my current problem, when I open the batch file, there is actually an empty line above the ISA segment begins. Back before the upgrade, there wasn’t one. I looked through the gen_x12 file. It is pristine. There isn’t any spaces in the $out.=
I don’t know where the empty line is introduced when I generate the x12 file. I just have to keep doing what I am doing until I have time to delve into it further.