Test 5010 ERA parsing code

aethelwulffe wrote on Tuesday, January 31, 2012:

http://www.oemr.org/phpBB3/viewtopic.php?f=10&t=49&p=320#p320

Check out the above link.  I’d go into detail here, but it’s easier just to link!

bradymiller wrote on Tuesday, January 31, 2012:

git, git, git… :slight_smile:

-brady

aethelwulffe wrote on Tuesday, January 31, 2012:

Ja, Ja….   :(  sorry….

aethelwulffe wrote on Wednesday, February 01, 2012:

PS:
Please ensure that any 835’s you test with do NOT have line returns.
Availity (for one) defaults to giving you era’s with line returns after each segment.  Even if you have configured your remittance advice file format stuff to strip line returns for 4010, when you upgrade to 5010, you might need to re-configure so that it sends it this way.
  To check this out, open your era file with a word processor (libreoffice, word, etc…) and change you view settings to “Show non-printing characters”.  You will then be able to see the line return symbols.  There should only be one at the end of the file.   They look like this:  ¶

yehster wrote on Wednesday, February 01, 2012:

https://github.com/yehster/openemr/commit/2d5c8e90ede5af6a67aa64ab8a7e28342719c1d1

Here’s a git branch with Art’s changes… (I think it’s only the one file). Correct me if I’m wrong.

Art,
Here’s a git suggestion that you might like… 
You can always create a new separate local git repository from scratch.
For instance to share this one change.
Start in an empty directory
1. create a brand new repository
git clone git@github.com:openemr/openemr
2. cd into new repository
cd openemr
3. create and checkout new branch
git branch my_835_changes
git checkout my_835_changes
4. copy over the files from where ever else you were working into this new repository
(use the command prompt or the windows explorer as you see fit)
5. Review the changes from command line (optional)
git diff
6. add and commit
git add .
git commit -m “This is the commit message”
7. Push into your github
git push git@github.com:aethelwulffe/openemr.git my_835_changes

tmccormi wrote on Friday, February 03, 2012:

I found a tool on sourceforge called edireader  It is a Java all (command line) that will parse and format X12 files so that are a lot more readable.  Good for debugging.  Check it out.  The results look like this sample 835 file.  Works well on 837s too.

ISA*00*          *00*          *ZZ*D00111         *ZZ*0055           *030603*1337*U*00401*000000121*0*T*:~
   GS*HP*D00111*0055*20030603*1337*1210001*X*004010X091A1~
      ST*835*0001~
         BPR*I*144.68*C*CHK************20030604~
         TRN*1*123456789*1386000134~
         REF*EV*0055~
         DTM*405*20030604~
         +------ 1000
         |  N1*PR*Department of Community Health~
         |  N3*P.O. Box 30479~
         |  N4*Lansing*MI*48909~
         |  PER*CX**EM*providersupport@michigan.gov*TE*8002922550~
         +-----------
         +------ 1000
         |  N1*PE*STEIN FRANK N MD*FI*111223333~
         +-----------
         +------ 2000
         |  LX*1~
         |  TS3*109876543*11*20031231*4*453.33~
         |  +------ 2100
         |  |  CLP*111111*1*240*35.89**MC*0123456789~
         |  |  NM1*QC*1*SMITH*JANE****MR*44444444~
         |  |  NM1*82*1*STEIN*FRANK*N**MD*MC*109876543~
         |  |  DTM*232*20030315~
         |  |  DTM*233*20030315~
         |  |  +------ 2110
         |  |  |  SVC*HC:99431*150*35.89**1~
         |  |  |  DTM*150*20030315~
         |  |  |  DTM*151*20030315~
         |  |  |  CAS*CO*A2*114.11~
         |  |  |  REF*6R*123123001~
         |  |  |  LQ*HE*N14~
         |  |  +-----------
         |  |  +------ 2110
         |  |  |  SVC*HC:99238*90*0**1~
         |  |  |  DTM*472*20030315~
         |  |  |  CAS*CO*B18*90~
         |  |  |  REF*6R*123123002~
         |  |  |  LQ*HE*MA66~
         |  |  +-----------
         |  +-----------
         |  +------ 2100
         |  |  CLP*111111*1*60*31.18**MC*1234567890~
         |  |  NM1*QC*1*SMITH*JANE****MR*44444444~
         |  |  NM1*82*1*STEIN*FRANK*N**MD*MC*109876543~
         |  |  DTM*232*20030318~
         |  |  DTM*233*20030318~
         |  |  +------ 2110
         |  |  |  SVC*HC:99213*60*31.18**1~
         |  |  |  DTM*150*20030318~
         |  |  |  DTM*151*20030318~
         |  |  |  CAS*CO*A2*28.82~
         |  |  |  REF*6R*123124001~
         |  |  |  LQ*HE*N14~
         |  |  +-----------
         |  +-----------
         |  +------ 2100
         |  |  CLP*111111*1*93.33*46.43**MC*2345678901~
         |  |  NM1*QC*1*SMITH*JANE****MR*44444444~
         |  |  NM1*82*1*STEIN*FRANK*N**MD*MC*109876543~
         |  |  DTM*232*20030401~
         |  |  DTM*233*20030401~
         |  |  +------ 2110
         |  |  |  SVC*HC:99391*93.33*46.43**1~
         |  |  |  DTM*150*20030401~
         |  |  |  DTM*151*20030401~
         |  |  |  CAS*CO*42*46.90~
         |  |  |  REF*6R*123125001~
         |  |  |  LQ*HE*N14~
         |  |  +-----------
         |  +-----------
         |  +------ 2100
         |  |  CLP*111111*1*60*31.18**MC*3456789012~
         |  |  NM1*QC*1*SMITH*JANE****MR*44444444~
         |  |  NM1*82*1*STEIN*FRANK*N**MD*MC*109876543~
         |  |  DTM*232*20030415~
         |  |  DTM*233*20030415~
         |  |  +------ 2110
         |  |  |  SVC*HC:99213*60*31.18**1~
         |  |  |  DTM*150*20030415~
         |  |  |  DTM*151*20030415~
         |  |  |  CAS*CO*A2*28.82~
         |  |  |  REF*6R*123126001~
         |  |  |  LQ*HE*N14~
         |  |  +-----------
         |  +-----------
         +-----------
      SE*62*0001
   GE*1*1210001
IEA*1*000000121

tmccormi wrote on Friday, February 03, 2012:

Wow, typo hell:  "I found a tool on sourceforge called edireader  It is a Java app (command line) that will parse and format X12 files so that they are a lot more readable.
-“time for a break” Tony

voipbound wrote on Friday, February 03, 2012:

Sweet, thank you…

weesnerkim wrote on Wednesday, February 08, 2012:

Hey Art

I bill directly to PalmettoGBA Medicare in 5010 using the dial-up GPNET site. I have been testing your new ERA code and it works very well. The only thing I am having trouble with is we submit G8553 e/prescribing report codes of zero dollars. When these are posted they are re-inserted as if they were new:
CPT4:G8553 Added by Ins1
N365: This procedure code is not payable. It is for reporting/information purposes only.

Also I get adjustment doubling:
237:  -0.79             (normal adjustment)
A2: Contractual adjustment      -0.79   (added adjustment)

These are minor issues and I am chasing them in the code. This module is the best, it saves so much time and trouble in processing ERA reports it’s not even funny. It is one of the most liked features by my clients.

Good job!

Kim Weesner

Now if we had automatic removal of line feeds life would be grand.

weesnerkim wrote on Wednesday, February 08, 2012:

Art

I forgot to mention, this module was working so well I added all the new remark codes thinking that would be helpful to everyone. It didn’t turn out well, there was way to much data and I was unable to run the module (HTTP: 1.0 500 Server error). The code lists are created with array which I assume is the variable stack leaving not that much room. It would be nice to have them in a database table or something of the sorts. Nice feature for future.

Kim

aethelwulffe wrote on Wednesday, February 08, 2012:

Finally!  FEEDBACK!  W00T!

…I have been too chicken to test it myself. :slight_smile:
I have absolutely no understanding of what you are talking about with the e-prescribing reporting, but I am glad you are chasing down whatever it is….does it have to do with specific information parsed out of the ERA?  If so, it may be data we are simply ignoring, or we are not parsing properly.  If that is the case, I may be able to help.

What I CAN do is make you an app to remove your line returns.  It will be a windows executable, but will run on Ubuntu.  It will just be a cheezy “read all the lines, print them to a file as a single string” kind of converter.  Would that be useful?

aethelwulffe wrote on Wednesday, February 08, 2012:

Just a note here, the file I posted at the top of this thread does NOT ask if the ERA is 4010 or 5010, it just assumes that it is 5010.
  I will update to include legacy reference.

weesnerkim wrote on Thursday, February 09, 2012:

If you have time a line feed removal would be great. I have been so busy with Medicare problems that I haven’t had time to breath. The doctors want all this status reporting, 999 ack, 277 status and ERA, you solved ERA, I wrote 999 and 277 report processors. I am putting the finishing touches on them now, you may be interested. Office Ally is now sending reports out in 999 and 277 formats in a .zip file.

I have been using parse_era.inc.php on a mix of 4010 and 5010 ERA files. Maybe my errors are due to the difference, I will check.

Glad to provide feedback, I have been putting this baby to the test, at least six different files this week, lots of deductibles, many adjustments, and some rejects for strange reasons. In my opinion it is working 99% with minimal problems.
This feature is extremely  important to me and my clients.

Thank you
Kim Weesner

aethelwulffe wrote on Friday, February 10, 2012:

http://www.oemr.org/phpBB3/viewtopic.php?f=5&t=111

The line return stripping program is located in the above topic.
It provides feedback on the files being processed etc… and does not alter the originals.

Have fun!

weesnerkim wrote on Thursday, February 16, 2012:

Thank you thank you thank you!
It works great, I am so grateful!

Kim Weesner

aethelwulffe wrote on Monday, March 05, 2012:

Hi Kim!
Download this one: http://starfrontiers.org/oemr/parse_era.inc.zip for a version that seems to take care of the line return issue (Thanks Kevin M.!)

tmccormi wrote on Monday, March 05, 2012:

What’s needed to get this ERA stuff off the ether and into the code base?  I’ve lost the thread of continuity….

-Tony

weesnerkim wrote on Tuesday, March 13, 2012:

Hi Art
Thanks, I will check this out. I use the ERA posting all the time, works real good. I was wondering why it didn’t make it to the patch?

Kim