This project has moved and is read-only. For the latest updates, please go here.

837I Parse

Mar 28, 2013 at 10:07 PM
I am getting the following error when try to parse an 837 claim. The 837 data is below as well.

oopfactory.x12.parsing.model.transactionvalidationexception: segment 'LX^1' in segment position 6024 within transaction '0002' cannot be identified within the supplied specification for fransaction set 837.
SE^29239^0002~
ST^837^0003^005010X223A1~
BHT^0019^00^201212300214^20121230^0214^CH~
NM1^41^2^HOSPITAL NAME^^^^^46^741152597~
PER^IC^Jane Doe^TE^9005555555^FX^8005551212^EM^8775551212~
NM1^40^2^XXXXXXX^^^^^46^123456789~
HL^1^^20^1~
PRV^BI^PXC^324500000X~
NM1^85^2^HOSPITAL NAME^^^^^XX^1639100860~
N3^225 Main Street~
N4^Centerville^PA^17111~
REF^EI^123456789~
NM1^87^2~
N3^225 Main Street~
N4^Centerville^PA^17111~
HL^2^1^22^1~
SBR^P^^G01010101^^^^^1^CI~
NM1^IL^1^Doe^John^^^^MI^123456~
N3^225 Main Street~
N4^Centerville^PA^17111^US~
DMG^D8^12345678^F~
NM1^PR^2^INSURANCE NAME^^^^^PI^UBY~
N3^225 Main Street~
N4^Centerville^PA^17111^US~
REF^G2^450184~
HL^3^2^23^0~
PAT^19~
NM1^QC^1^Doe^Sally^J~
N3^225 Main Street~
N4^Centerville^PA^17111^US~
DMG^D8^19330706^F~
CLM^A37YH556^285^^^13ºAº1^^A^Y^Y~
DTP^096^TM^1130~
DTP^434^RD8^20121129-20121129~
DTP^435^DT^199610131242~
CL1^3^1^01~
REF^EA^44444TH56~
NTE^ADD^OR PP~
HI^BKº30480~
HI^PRº30480~
HI^BHº11ºD8º20120101~
HI^BGº09~
NM1^71^1^SALLY^JANE^^^^XX^1306964739~
REF^0B^M2831~
LX^1~
SV2^906^HCºS9480^285^UN^1~
DTP^472^D8^19970114~
SE^47^0003~
Any help would be appreciated.
Mar 28, 2013 at 11:13 PM
You have actually posted your transaction 0003.
Can you post your transaction 0002 from the error message. It should start with ST^837^0002^005010X223A1~ and end with SE^29239^0002~

but you need only post from the CLM^ segment to 6024th segment for me to identify your problem.
Mar 28, 2013 at 11:29 PM
CLM^A37YH556^20967.21^^^72ºAº7^^A^Y^Y^^^^^^^^^^^OT~
DTP^096^TM^1130~
DTP^434^RD8^20120810-20120824~
DTP^435^DT^199610131242~
CL1^3^1^01~
REF^G1^13579~
REF^EA^44444TH56~
NTE^ADD^DY MR^^REBILL D9 PC9~
HI^BKº5856~
HI^PRº5856~
HI^BFº40391^BFºV4511^BFº28521^BFº58881^BFº2800^BFº2801^BFº99673~
HI^BHº11ºD8º20120725~
HI^BGº09^BGºD9~
NM1^71^1^DOE^JANE^D^^^XX^1124063227~
REF^0B^K6355~
SBR^S^18^^Group Name^^^^^MC~
OI^^^Y^^^Y~
NM1^IL^1^Doe^John^T^^^MI^123456~
N3^225 Main Street~
N4^Centerville^PA^17111^US~
REF^SY^528446666~
NM1^PR^2^MEDICAID^^^^^PI^X50~
REF^G1^13579~
NM1^85^2~
REF^G2^137805112~
LX^1~
SV2^258^^57.5^UN^1~
DTP^472^D8^19970114~
LX^2~
SV2^258^^115^UN^2~
DTP^472^D8^19970114~
LX^3~
SV2^258^^115^UN^2~
DTP^472^D8^19970114~
LX^4~
SV2^258^^115^UN^2~
DTP^472^D8^19970114~
LX^5~
SV2^258^^57.5^UN^1~
DTP^472^D8^19970114~
LX^6~
SV2^258^^115^UN^2~
DTP^472^D8^19970114~
LX^7~
SV2^270^^32.5^UN^1~
DTP^472^D8^19970114~
LX^8~
SV2^301^HCº83970^329.75^UN^1~
DTP^472^D8^19970114~
LX^9~
SV2^301^HCº82310^23.75^UN^1~
DTP^472^D8^19970114~
LX^10~
SV2^301^HCº84100^16.5^UN^1~
DTP^472^D8^19970114~
LX^11~
SV2^301^HCº84520^210.5^UN^2~
DTP^472^D8^19970114~
LX^12~
SV2^301^HCº80069^195.75^UN^1~
DTP^472^D8^19970114~
LX^13~
SV2^301^HCº83970^329.75^UN^1~
DTP^472^D8^19970114~
LX^14~
SV2^301^HCº84134^29.25^UN^1~
DTP^472^D8^19970114~
LX^15~
SV2^301^HCº83735^30^UN^1~
DTP^472^D8^19970114~
LX^16~
SV2^301^HCº82728^144.5^UN^1~
DTP^472^D8^19970114~
LX^17~
SV2^301^HCº84550^116^UN^1~
DTP^472^D8^19970114~
LX^18~
SV2^301^HCº83540^68.5^UN^1~
DTP^472^D8^19970114~
LX^19~
SV2^301^HCº83550^29.25^UN^1~
DTP^472^D8^19970114~
LX^20~
SV2^301^HCº84075^113.5^UN^1~
DTP^472^D8^19970114~
LX^21~
SV2^301^HCº82465^84^UN^1~
DTP^472^D8^19970114~
LX^22~
SV2^301^HCº84460^115.75^UN^1~
DTP^472^D8^19970114~
LX^23~
SV2^301^HCº83970^329.75^UN^1~
DTP^472^D8^19970114~
LX^24~
SV2^301^HCº82310^23.75^UN^1~
DTP^472^D8^19970114~
LX^25~
SV2^301^HCº84100^16.5^UN^1~
DTP^472^D8^19970114~
LX^26~
SV2^301^HCº83970^329.75^UN^1~
DTP^472^D8^19970114~
LX^27~
SV2^301^HCº82310^23.75^UN^1~
DTP^472^D8^19970114~
LX^28~
SV2^301^HCº84100^16.5^UN^1~
DTP^472^D8^19970114~
LX^29~
SV2^301^HCº84132^13.5^UN^1~
DTP^472^D8^19970114~
LX^30~
SV2^302^HCº86141^101.75^UN^1~
DTP^472^D8^19970114~
LX^31~
SV2^305^HCº85025^91.25^UN^1~
DTP^472^D8^19970114~
LX^32~
SV2^305^HCº85014^17^UN^1~
DTP^472^D8^19970114~
LX^33~
SV2^305^HCº85018^18.75^UN^1~
DTP^472^D8^19970114~
LX^34~
SV2^306^HCº87340^82.5^UN^1~
DTP^472^D8^19970114~
LX^35~
SV2^636^HCºJ1644^125.75^UN^21~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^36~
SV2^636^HCºQ4081^290^UN^20~
DTP^472^D8^19970114~
LIN^^N4^55513012610~
CTP^^^^20^UN~
LX^37~
SV2^636^HCºJ1644^125.75^UN^21~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^38~
SV2^636^HCºJ2916^53^UN^2~
DTP^472^D8^19970114~
LIN^^N4^00364279123~
CTP^^^^2^UN~
LX^39~
SV2^636^HCºJ2501^146.25^UN^5~
DTP^472^D8^19970114~
LIN^^N4^00074165801~
CTP^^^^1^UN~
LX^40~
SV2^636^HCºQ4081^290^UN^20~
DTP^472^D8^19970114~
LIN^^N4^55513012610~
CTP^^^^20^UN~
LX^41~
SV2^636^HCºJ1644^125.75^UN^21~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^42~
SV2^636^HCºJ1644^125.75^UN^21~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^43~
SV2^636^HCºQ4081^290^UN^20~
DTP^472^D8^19970114~
LIN^^N4^55513012610~
CTP^^^^20^UN~
LX^44~
SV2^636^HCºJ1644^125.75^UN^21~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^45~
SV2^636^HCºQ4081^290^UN^20~
DTP^472^D8^19970114~
LIN^^N4^55513012610~
CTP^^^^20^UN~
LX^46~
SV2^636^HCºJ1644^125.75^UN^21~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^47~
SV2^636^HCºJ2916^53^UN^2~
DTP^472^D8^19970114~
LIN^^N4^00364279123~
CTP^^^^2^UN~
LX^48~
SV2^636^HCºJ2501^146.25^UN^5~
DTP^472^D8^19970114~
LIN^^N4^00074165801~
CTP^^^^1^UN~
LX^49~
SV2^636^HCºQ4081^290^UN^20~
DTP^472^D8^19970114~
LIN^^N4^55513012610~
CTP^^^^20^UN~
LX^50~
SV2^636^HCºJ1644^125.75^UN^21~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^51~
SV2^636^HCºJ1644^125.75^UN^21~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^52~
SV2^636^HCºQ4081^290^UN^20~
DTP^472^D8^19970114~
LIN^^N4^55513012610~
CTP^^^^20^UN~
LX^53~
SV2^636^HCºJ1644^105^UN^20~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^54~
SV2^821^^1392.19^UN^3~
DTP^472^D8^19970114~
LX^55~
SV2^821^^1518.19^UN^4~
DTP^472^D8^19970114~
LX^56~
SV2^821^^1916.69^UN^4~
DTP^472^D8^19970114~
LX^57~
SV2^821^^1518.19^UN^4~
DTP^472^D8^19970114~
LX^58~
SV2^821^^1392.19^UN^3~
DTP^472^D8^19970114~
LX^59~
SV2^821^^1518.19^UN^4~
DTP^472^D8^19970114~
LX^60~
SV2^821^^2042.69^UN^5~
DTP^472^D8^19970114~
LX^61~
SV2^821^^1392.19^UN^3~
DTP^472^D8^19970114~
LX^62~
SV2^821^^1518.19^UN^4~
DTP^472^D8^19970114~
HL^3^^20^1~
PRV^BI^PXC^261QE0700X~
NM1^85^2^MHHS HERMANN DIALYSIS^^^^^XX^1063448124~
N3^225 Main Street~
N4^Centerville^PA^17111~
REF^EI^741152597~
NM1^87^2~
N3^225 Main Street~
N4^Centerville^PA^17111~
HL^4^3^22^0~
SBR^P^18^G01020102^^^^^9^MB~
NM1^IL^1^Doe^John^T^^^MI^123456~
N3^225 Main Street~
N4^Centerville^PA^17111^US~
DMG^D8^19330706^M~
NM1^PR^2^MEDICARE PART B^^^^^PI^M55~
REF^G2^452309~
CLM^A37YH556^2045.25^^^72ºAº7^^A^Y^Y^^^^^^^^^^^OT~
DTP^096^TM^1130~
DTP^434^RD8^20120829-20120829~
DTP^435^DT^199610131242~
CL1^3^1^01~
REF^G1^13579~
REF^EA^44444TH56~
NTE^ADD^DY MR^^REBILL D9 PC9~
HI^BKº5856~
HI^PRº5856~
HI^BFº40391^BFºV4511^BFº28521^BFº58881^BFº2800^BFº2801^BFº99673~
HI^BHº11ºD8º20120725~
HI^BGº09^BGºD9~
NM1^71^1^DOE^JANE^D^^^XX^1124063227~
REF^0B^K6355~
SBR^S^18^^Group Name^^^^^MC~
OI^^^Y^^^Y~
NM1^IL^1^Doe^John^T^^^MI^123456~
N3^225 Main Street~
N4^Centerville^PA^17111^US~
REF^SY^528446666~
NM1^PR^2^MEDICAID^^^^^PI^X50~
REF^G1^13579~
NM1^85^2~
REF^G2^137805112~
LX^1~
SV2^258^^230^UN^4~
DTP^472^D8^19970114~
LX^2~
SV2^270^^32.5^UN^1~
DTP^472^D8^19970114~
LX^3~
SV2^301^HCº80069^195.75^UN^1~
DTP^472^D8^19970114~
LX^4~
SV2^301^HCº83735^30^UN^1~
DTP^472^D8^19970114~
LX^5~
SV2^301^HCº84550^116^UN^1~
DTP^472^D8^19970114~
LX^6~
SV2^301^HCº84075^113.5^UN^1~
DTP^472^D8^19970114~
LX^7~
SV2^301^HCº82465^84^UN^1~
DTP^472^D8^19970114~
LX^8~
SV2^301^HCº84460^115.75^UN^1~
DTP^472^D8^19970114~
LX^9~
SV2^636^HCºJ1644^105^UN^20~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^10~
SV2^801^^1022.75^UN^4~
DTP^472^D8^19970114~
HL^5^^20^1~
PRV^BI^PXC^261QE0700X~
NM1^85^2^MHHS HERMANN DIALYSIS^^^^^XX^1063448124~
N3^225 Main Street~
N4^Centerville^PA^17111~
REF^EI^741152597~
NM1^87^2~
N3^225 Main Street~
N4^Centerville^PA^17111~
HL^6^5^22^0~
SBR^P^18^G01020102^^^^^9^MB~
NM1^IL^1^Doe^John^T^^^MI^123456~
N3^225 Main Street~
N4^Centerville^PA^17111^US~
DMG^D8^19330706^M~
NM1^PR^2^MEDICARE PART B^^^^^PI^M55~
REF^G2^452309~
CLM^A37YH556^3584.13^^^72ºAº7^^A^Y^Y^^^^^^^^^^^OT~
DTP^096^TM^1130~
DTP^434^RD8^20120830-20120831~
DTP^435^DT^199610131242~
CL1^3^1^01~
REF^G1^13579~
REF^EA^44444TH56~
NTE^ADD^DY MR^^REBILL D9 PC9~
HI^BKº5856~
HI^PRº5856~
HI^BFº40391^BFºV4511^BFº28521^BFº58881^BFº2800^BFº2801^BFº99673~
HI^BHº11ºD8º20120725~
HI^BGº09^BGºD9~
NM1^71^1^SWINFORD^RITA^D^^^XX^1124063227~
REF^0B^K6355~
SBR^S^18^^Group Name^^^^^MC~
OI^^^Y^^^Y~
NM1^IL^1^Doe^John^T^^^MI^123456~
N3^225 Main Street~
N4^Centerville^PA^17111^US~
REF^SY^528446666~
NM1^PR^2^MEDICAID^^^^^PI^X50~
REF^G1^13579~
NM1^85^2~
REF^G2^137805112~
LX^1~
SV2^270^^45.25^UN^1~
DTP^472^D8^19970114~
LX^2~
SV2^301^HCº84132^13.5^UN^1~
DTP^472^D8^19970114~
LX^3~
SV2^636^HCºJ1644^199^UN^32~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^4~
SV2^636^HCºQ4081^290^UN^20~
DTP^472^D8^19970114~
LIN^^N4^55513012610~
CTP^^^^20^UN~
LX^5~
SV2^821^^1518.19^UN^4~
DTP^472^D8^19970114~
LX^6~
SV2^821^^1518.19^UN^4~
DTP^472^D8^19970114~
HL^7^^20^1~
PRV^BI^PXC^261QE0700X~
NM1^85^2^MHHS HERMANN DIALYSIS^^^^^XX^1063448124~
N3^225 Main Street~
N4^Centerville^PA^17111~
REF^EI^741152597~
NM1^87^2~
N3^225 Main Street~
N4^Centerville^PA^17111~
HL^8^7^22^0~
SBR^P^18^G01020102^^^^^9^MB~
NM1^IL^1^Doe^John^T^^^MI^123456~
N3^225 Main Street~
N4^Centerville^PA^17111^US~
DMG^D8^19330706^M~
NM1^PR^2^MEDICARE PART B^^^^^PI^M55~
REF^G2^452309~
CLM^A37YH556^5592.07^^^72ºAº7^^A^Y^Y^^^^^^^^^^^OT~
DTP^096^TM^1130~
DTP^434^RD8^20120801-20120806~
DTP^435^DT^199610131242~
CL1^3^1^01~
REF^G1^13579~
REF^F8^R555588~
REF^EA^44444TH56~
NTE^ADD^DY MR^^REBILL D9 PC9~
HI^BKº5856~
HI^PRº5856~
HI^BFº40391^BFºV4511^BFº28521^BFº58881^BFº2800^BFº2801^BFº99673~
HI^BHº11ºD8º20120725~
HI^BGº09^BGºD9~
NM1^71^1^SWINFORD^RITA^D^^^XX^1124063227~
REF^0B^K6355~
SBR^S^18^^Group Name^^^^^MC~
OI^^^Y^^^Y~
NM1^IL^1^Doe^John^T^^^MI^123456~
N3^225 Main Street~
N4^Centerville^PA^17111^US~
REF^SY^528446666~
NM1^PR^2^MEDICAID^^^^^PI^X50~
REF^G1^13579~
NM1^85^2~
REF^G2^137805112~
LX^1~
SV2^258^^57.5^UN^1~
DTP^472^D8^19970114~
LX^2~
SV2^258^^115^UN^2~
DTP^472^D8^19970114~
LX^3~
SV2^270^^30.5^UN^1~
DTP^472^D8^19970114~
LX^4~
SV2^636^HCºJ1644^125.75^UN^21~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^5~
SV2^636^HCºJ1644^125.75^UN^21~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^6~
SV2^636^HCºQ4081^290^UN^20~
DTP^472^D8^19970114~
LIN^^N4^55513012610~
CTP^^^^20^UN~
LX^7~
SV2^636^HCºJ1644^125.75^UN^21~
DTP^472^D8^19970114~
LIN^^N4^15082072167~
CTP^^^^20^UN~
LX^8~
SV2^636^HCºJ1644^20.75^UN^1~
DTP^472^D8^19970114~
LX^9~
SV2^821^^1392.19^UN^3~
DTP^472^D8^19970114~
LX^10~
SV2^821^^1916.69^UN^4~
DTP^472^D8^19970114~
LX^11~
SV2^821^^1392.19^UN^3~
DTP^472^D8^19970114~
HL^9^^20^1~
Transaction 0002 is actually much longer but has been truncated due to length, I hope that I have provided enough to reach the proper segment. I am having this issue with all the 837's I receive from this client. I could attempt another file that would provide a shorter transaction if this transaction ends up being to long.

Thanks!
Mar 29, 2013 at 2:21 AM
I was able to parse this segment so it doesn't look like it has the offending segment contained within it.
I have also updated the code so that the error message will show all the LoopIds where it attempted to find the segment.
Typically what happens is an unexpected segment is added right before the LX^1~ line which throws off where the parser thinks it is in the specification and this is what causes the LX^1~ to be unrecognized.
When you see the list of loop IDs, 2300 should be in the list (either the last or next to last), but in your exception it probably isn't.

This will be easy to fix once you give me a segment where I can reproduce the error.
Apr 4, 2013 at 8:09 PM
Is there a way to determine where segment 6024 is at exactly so that I can get you the correct part of the file. It seems that this problem happens on very long claims from my client so it is hard to get the correct information into the text limit on here.

Thanks
Apr 4, 2013 at 8:31 PM
I have update the latest source to give additional error handling that will show what loop the LX^1 was at when it attempted to parse.
If you run the code with the latest dll you can probably post the new error message without having to submit any additional x12.

If however you needed to see your X12, 6024 is referring to the segment index. If you had an application like UltraEdit that will let you find and replace ~ with ~<carriage return> then you could just scroll down to line 6024 after it's been normalized to one segment per line.
Apr 4, 2013 at 8:48 PM
You can also try de-identifying your x12: Deidentifier for removing PII and PHI (http://etasoft.com/ot.htm) especially for creating test files.
Then you can submit your stuff as an attachment to an issue and I can attempt to parse it on my side.