Silvenga/vscode-edi-x12-support

Formatting and "goto" Fail with "No ISA header found."

Closed this issue · 9 comments

I am trying to use the plugin to format X12 files and it is failing with "No ISA header found."

This happens even using one of your test files, located in this repo.

I am running Visual Studio Code on a Mac, not sure if they would have anything to do with it?

Ah, thanks for the report!

Can you hover over the No Valid ISA Header text in yellow on the bottom and tell me the text? If possible, the full ISA header would also be great (I don't need the anything past the ST segment).

I have found when copying from some editors/web browsers the whitespace can get messed up in the ISA header (which breaks the ISA header). I'm wondering if this your issue.

I do have a bad header EDI file in the repo to test with. 😸

ISA*00*          *00*          *12*5124677170     *12*8003753403     *170830*0945*U*00401*000005045*0*P*>
GS*IN*5124677170     *8003753403     *20170830*0945*5045*X*004010

The text in the hover over is : "Repeating Separator does not exist in the correct element."

@tkvangorder found the bug. I'm not handling word based separators - is U normal? It's fixed in 0.10.5, I'll release it when I get home.

Thanks for the quick turn around, really nice tool.

Are you referring to the "U" in the I10 Data element? That is the "Interchange Control Standards Identifier" and I believe it is always "U".

http://www.lear.com/user_area/extranet_files/lear-93-EDI_ANSI_ASC_X12_Envelope_Structure_3060.pdf

Ah, I must have missed that part of the broader spec. Under HIPAA X12 5010, ISA11 is always the repetition separator (which is where my specs are coming from). Do you know if ANSI X12 has repeating elements within a segment?

ISA11 usage - https://msdn.microsoft.com/en-us/library/bb259967%28v=bts.20%29.aspx

  • Standard identifier
    • The default value for the standard identifier is U - U.S. EDI Community of ASC X12, TDCC and UCS.
  • Repetition separator
    • The repetition separator is used to separate segments that repeat within a transaction set. The default value for the repetition separator is ^. This element is limited to the values in the ASCII character set.

I might need to implement a way to disable parsing repeating elements in everything non-HIPAA (likely user configurable).... Either way, I wasn't correctly following spec - any element/segment separator that was a letter would break parsing, and spec says any separator can be used.

@tkvangorder pushed, please verify if you can.

@Silvenga Works like a charm now.

Don't you love standards that have variations? This link (http://www.rdpcrystal.com/whats-the-repetition-separator-character-in-5010-x12/) gives an interesting description of the change and it looks like it is specific to HIPAA 5010s. I actually used to work in a healthcare company and was all to familiar with 278s. I am now working for a commerce company and thought I was putting X12 behind me....nope. 8)