none
HIPAA 837i - Segment Not in Proper Squence - Unexpected Segment RRS feed

  • Question

  • I'm getting started on a BTS project working with 837I files by just getting it to parse through the EDIreceive pipeline and have a send port retrieve the XML.

    I'm getting this error and I don't understand how to clear it.

    Error: 1(Segment level error)
              SegmentID: REF
              Position in TS: 36
              7: Segment Not In Proper Sequence

    I've gone through the Implentation Guide and have identified that what I believe this error to be is referring to the Billing Provider Secondary Indentification in the 2010AA Loop...which should be in position 35.

    How do I precisely determine what position my data is in?  Do I start counting from the GS segment? And do I include the segment tags when counting? 

    I'm using BTS 2006 R2.  I installed KB939080 and deployed the updated schemas but getting the same results.  Should I be using the 'single' or 'multiple' schema? 

    Could there be some settings for the receive pipeline or the party I should be on the lookout for?  Or do I need to customize the schema to somehow ignore this sequencing issue? 

    I'm using a FILE transport, just dropping some sample messages in native code into the receive location.  Should I be using a different method?  Obviously due to the nature of the data I can't post it.

    Thanks in advance.
    Thursday, April 2, 2009 7:58 PM

Answers

  • HI,
         Counting should be from ST segement including ST. Since your error is saying :
               Position in TS: 36
              7: Segment Not In Proper Sequence

    Then including ST go at line number 36 if you are using CRLF as segment terminator suffix. Otherwise you have to count segment wise.

    For example:

    1- ST*850*3313~
    2- BEG*00*AB*BEG03**45670123~
    3- CUR*001*CUR~
    4- REF*01***01:C04002~
    5- PER*1A~
    6- TAX*TAX01~

    So here TAX is at position 6.

    In this way you can go to this segment and watch the schema properly . I think then you will come to know about error.

    One more thiing ou can do it that you can validate it using Visual studio.
    If you do not know validation using visual studio you can go to http://mohsinkalam.wordpress.com/2007/11/ .


    You can customize your schema also. But first you need to find where is the problem.


    Thanks
    Gyan
    • Marked as answer by MitchP_ny Friday, April 3, 2009 4:03 PM
    Friday, April 3, 2009 5:00 AM

All replies

  • HI,
         Counting should be from ST segement including ST. Since your error is saying :
               Position in TS: 36
              7: Segment Not In Proper Sequence

    Then including ST go at line number 36 if you are using CRLF as segment terminator suffix. Otherwise you have to count segment wise.

    For example:

    1- ST*850*3313~
    2- BEG*00*AB*BEG03**45670123~
    3- CUR*001*CUR~
    4- REF*01***01:C04002~
    5- PER*1A~
    6- TAX*TAX01~

    So here TAX is at position 6.

    In this way you can go to this segment and watch the schema properly . I think then you will come to know about error.

    One more thiing ou can do it that you can validate it using Visual studio.
    If you do not know validation using visual studio you can go to http://mohsinkalam.wordpress.com/2007/11/ .


    You can customize your schema also. But first you need to find where is the problem.


    Thanks
    Gyan
    • Marked as answer by MitchP_ny Friday, April 3, 2009 4:03 PM
    Friday, April 3, 2009 5:00 AM
  • Hi,

    Is this the complete error details that you are seeing ? Can you check the eventvwr for the error and give us the error details ? Can you provide the instance ? Did you do any modifications to the schema ?

    The loop that you have mentioned `TS837Q3_2010AA_Loop` has a REF subloop with two individual REF loops. The REF segments of a particular loop must occur together, followed by the REF segments of the other loop. If this is not followed in the inbound instance we usually see REF Segment Not In Proper Sequence Error.

    Thanks,
    Kowshik Palivela

    Friday, April 3, 2009 12:30 PM
  • Just above the error you posted, it will state this:

    Error encountered during parsing. The X12 transaction set with id '0001' contained in functional group with id '1', in interchange with id '000001008', with sender id '123456789 ', receiver id '987654321 ' is being suspended with following errors:

    Error: 1(Segment level error)
              SegmentID: REF
              Position in TS: 36
              7: Segment Not In Proper Sequence

    The key is to look at  The X12 transaction set with id '0001': this indicates which transaction in the functional group you are looking at. In the above example it is ST*837*0001~

    From there count another 35 segments and you should see the segment that is not in the right order.


    You will then need to contact the sender and tell them that the segment is out of order.
    Eric Stott [http://blog.biztalk-info.com] - Mark as Answer if this reply does.
    • Edited by Eric Stott Friday, April 3, 2009 2:09 PM Segment count incorrect
    Friday, April 3, 2009 2:06 PM

  • Got it...after studying the schema and counting segments correctly I've now realized my problem is in the 2300 loop with reference numbers for claim information.

    And I will need to customize the schema to accomodate client requirements.

    Thank you!
    Friday, April 3, 2009 4:07 PM
  • I would not modify the schema, as it would violate HIPAA requirement, which would put you out of compliance, etc...
    Eric Stott [http://blog.biztalk-info.com] - Mark as Answer if this reply does.
    Friday, April 3, 2009 4:21 PM

  • Understood. But due to the nature of the business agreement with our client HIPAA compliance doesn't wholly apply.
    Friday, April 3, 2009 7:11 PM
  • Hello I am also having the issue but with EDI format -- 852. I am new to thsi Biztalk and EDI.

    I am getting the error from the eventlogger:

    Error: 1 (Segment level error)
     SegmentID: N2
     Position in TS: 1
     2: Unexpected segment

    And Here I am sending the DeliveryLocation and DierbergsLocation to N201 and N202 resp.

    The Source schema is custom one and it is in the below format and destination format is the EDI X12_00401_852.xsd (which we got it from biztalk EDI)

    Source Schema with a sample data:


    <PurchaseOrder xmlns="http://OrdersToSend">
     <PONumber>355792</PONumber>
     <VendorNo>00000991</VendorNo>
     <DeliveryLocation>018</DeliveryLocation>
     <DierbergsLocation>18</DierbergsLocation>
     <OrderDateTime>2009-07-15T14:18:00</OrderDateTime>
     <DeliveryDateTime>2008-03-11T00:00:00</DeliveryDateTime>
     <IdentificationCodeQualifier>92</IdentificationCodeQualifier>
     <OrderTypes>
      <OrderType>REGORDR</OrderType>
      <Supplier>
       <SupplierNo>991</SupplierNo>
       <SupplierName>DEAN FOODS</SupplierName>
       <Item>
        <ItemOrderCode>1020</ItemOrderCode>
        <Quantity>9</Quantity>
        <OrderSizes>
         <ItemSize>CASE</ItemSize>
        </OrderSizes>
       </Item>
      </Supplier>
     </OrderTypes>
    </PurchaseOrder>

    Please HELP.
    Thursday, July 16, 2009 7:48 PM