837I parse error

Jul 25, 2011 at 2:27 PM

Let me start by saying this is a great implementation!

I'm trying to parse out some 837I files to xml and I'm getting this error("XXXXX*XXXXX" are names):

 

Unhandled Exception: OopFactory.X12.Parsing.Model.TransactionValidationException
: Segment 'NM1*73*1*XXXXXX*XXXXXX****XX*1477640944' within transaction '611327716' cannot be identified within the supplied specification for transaction set
 837.
Parameter name: 837
   at OopFactory.X12.Parsing.X12Parser.Parse(Stream stream)
   at OopFactory.X12.X12Parser.Program.Main(String[] args)

I'm really new to this code and I'm not sure where to start looking. It appears that the NM1*73 element is unhandled? , NM1*71 and NM1*72 look like they parse fine.

All our 837P files parse without a hitch.

Any help would be greatly appreciated

Coordinator
Jul 26, 2011 at 1:36 AM

The specification may need to have the 73 entity code added.  Please let me know what Loop ID from the spec this is suppose to represent and I can modify the 837 specification so that it can recognize 73.

I had originally used the Implementation Guide from all 3 837D, 837P and 837I to merge together into the default 837 spec.  I may have just missed this entity code.

I also have a separate specification finder for the Institutional but I have not yet had a chance to write documentation on it.  I can update the code if you give me the loop Id where that segment belongs and I can shoot for another release by Sunday.

Thanks for trying us out.

Jul 26, 2011 at 2:52 PM

Thanks for getting back.

I went ahead and pulled down the latest(9298) source and it cleared up that problem. However, its still crashing in some of the 2330B loops.

Unhandled Exception: OopFactory.X12.Parsing.Model.TransactionValidationException
: Segment 'N3*CLAIM DEPARTMENT*PO BOX 1602' in position 2627 within transaction
'611044383' cannot be identified within the supplied specification for transacti
on set 837.

I'm poking at the code right now like a drunken pioneer surgeon. I've added N3, N4 and DTP elements to the 2330A and 2330B loops, both in ANSI-837-4010Specification and ANSI-837I-4010Specification.

My confusion right now is that these look like they are handled, and correctly. Would posting the full transaction help, because I'm stumped.

Coordinator
Jul 26, 2011 at 5:21 PM

Yes, please post the transaction and I will take a look.  You can use the "deidentifier" tool here, if you need to remove a lot PII or PHI (http://etasoft.com/ot.htm).

Usually what happens when I see this, is there is a child segment in a loop that isn't expecting it, the parser will try to recurse back up to the transaction level locking for a loop where that child segment belongs.

The problem probably isn't the 2330B loop, but the segment that appears right before may not be recognized in the loop.

 

Jul 26, 2011 at 6:12 PM

Thanks again for looking at this!

I've included the heading and trailing segments and adjusted the 'GS' count so its a valid ( or maybe not? ) 837I.

Also, this is not failing on every transaction in the file. I've been combing over transactions that parse. If I find any structural differences I'll let you know. If it would help, I could post examples of transactions that successfully parse also.

A question about the code: Where would I put a console message telling me which specification got 'chosen'?

Here's a sanitized version of the transaction in question ( great tip on etasoft's utility!). I've added <cr/lf> line terminators at the '~'

 

ISA*00*          *00*          *ZZ*580977458      *ZZ*12345678       *110411*1241*U*00401*611010013*1*P*|~
GS*HC*580977458*12345678*20110411*1241*611010013*X*004010X096A1~
ST*837*611044383~
BHT*9999*00*999999999*20070430*999999*CH~
REF*87*999999X999X9~
NM1*41*2*XXX, XXXXXX XXXXXXXXXXX XXXXXXXX*****46*999999999~
PER*IC*XXXXXXXXXXXXX XXXXXXXXXX*TE*9999999999*FX*9999999999*EM*XXXXXXX@XXXXXXXXX.XXX~
NM1*40*2*XXXXXXXX-XX XX XXXXXXXXX*****46*99999999~
HL*1**20*1~
PRV*BI*ZZ*999X99999X~
NM1*85*2*XXXXX XXXXXXX XXX*****XX*9999999999~
N3*XXX 999 XXX 99999~
N4*XXXXXXX*WA*999999999~
REF*EI*999999999~
PER*IC*XXXXX XXXXXXX XXX*TE*9999999999~
NM1*87*2*XXXXX XXXXXXX XXXXXX*****24*999999999~
N3*XXXX 999 XXX 99999~
N4*XXXXXXX*WA*999999999~
HL*2*1*22*1~
SBR*S********CI~
NM1*IL*1*XXXX*XXXXXXX*L***MI*999999999~
NM1*PR*2*XXXXXXXX-XX XX XXXXXXXXX*****PI*99999~
N3*XXXXXX XXXX*X X XXX 99~
N4*XXXXXXX*WA*99999~
HL*3*2*23*0~
PAT*01~
NM1*QC*1*XXXX*XXXXX****MI*999999999~
N3*XX XXX 9999~
N4*XXXXX*ID*999999999~
DMG*D8*19390220*F~
CLM*XXX99999*999.99***99|X|9*Y*A*Y*Y*********N~
DTP*434*RD8*20070417-20070417~
CL1*3*1*01~
AMT*C5*99.99~
REF*D9*99999999999999999XXX9999XXXXX-~
REF*EA*X9999999~
HI*XX|X9999*XX|X9999~
HI*XX|X999~
HI*XX|99|X9|99999999~
HI*XX|X9|||99.99~
NM1*71*1*XXXXXXXXX*XXXXXXX****24*999999999~
SBR*P*18*******MA~
CAS*CO*A2*99.9~
CAS*PR*2*99.99~
AMT*C4*999.99~
AMT*T3*999.99~
DMG*D8*19390220*F~
OI***Y***Y~
NM1*IL*1*XXXX*XXXXX****MI*999999999X~
N3*XX XXX 9999~
N4*XXXXX*ID*999999999~
NM1*PR*2*XXXXXXXX*****PI*99999~
N3*XXXXX XXXXXXXXXX*XX XXX 9999~
N4*XXXXX*NE*99999~
DTP*573*D8*20070509~
NM1*71*1~
REF*1G*X99999~
LX*1~
SV2*9999*XX|99999*99.99*UN*1~
DTP*472*D8*20070417~
LX*2~
SV2*9999*XX|99999*79*UN*1~
DTP*472*D8*20070417~
SE*62*611044383~
GE*1*611010013~
IEA*1*611010013~

Jul 26, 2011 at 11:09 PM

I found the problem!

I didnt' search the entire spec file for the 2330B loop specs, so I missed adding the NM3, NM4 and DTP to all the entries.

 

Here's the approximate locations:

File(line number):

Ansi-837-4010Specification.xml(178)
Ansi-837-4010Specification.xml(477)
Ansi-837I-4010Specification.xml(160)
Ansi-837I-4010Specification.xml(340)

 

Thanks again for your help!

This really is an excellent project. Keep up the good work!

 

Coordinator
Jul 27, 2011 at 12:13 PM

Cool, thanks for letting me know the needed changes.  I will be adding your sample 837 to the inventory of unit tests and make those changes this week.  I hope to get another release out in the next couple of weeks.