none
Error Generating X12 file RRS feed

  • Question

  • Hi All ,

     

    I am trying to create an EDI - X12 298 file. The issue which I am facing is most probably with the SE segment. I am trying to send a flat file and generate its corresponding X12 file but the following error is being encountered:

     

    Error: 1 (Miscellaneous error)
    
            8: No matching child node found
    
    Error: 2 (Segment level error)
    
            SegmentID: HL
    
            Position in TS: 57
    
            2: Unexpected segment
    
    Error: 3 (Segment level error)
    
            SegmentID: PAT
    
            Position in TS: 58
    
            3: Mandatory Segment Missing
    
    Error: 4 (Segment level error)
    
            SegmentID: PRV
    
            Position in TS: 58
    
            2: Unexpected segment
    
    Error: 5 (Segment level error)
    
            SegmentID: PRV
    
            Position in TS: 58
    
            7: Segment Not In Proper Sequence
    
    Error: 6 (Segment level error)
    
            SegmentID: SE
    
            Position in TS: 58
    
            3: Mandatory Segment Missing 

     

    This is not the case when I pass a flat file with any single record in it, it successfully generates a X12 file but when I try to process multiple records in a flat file the above mentioned error is occurred.

     

    Its like I am not able to set the correct ST/SE segment which needs to be configured for the flat file having multiple records. I want to create a X12 with single ST/SE in following manner:

    ISA

    GS

    BHT

                    ST

                                    Records

                                    Records

                                    Records

                                    Records

                    SE

    IEA

                                   


    If this post is helpful, please vote as helpful or marked as answer.

    Monday, November 23, 2015 11:04 AM

Answers

  • Ahh...ok.  This is the PACDR 837 transaction, not a 278.  That's a very important distinction.

    First, you don't need to do anything with the SE segment, it's handled automatically on the outbound.

    In the 837, you can loop at 2000A and 2000B so that's not a problem.

    The error is that PAT is missing.  Is it mapped from the source?

    Tuesday, November 24, 2015 8:20 PM
  • Keep in mind, where the PAT segment must appear is dependent on weather or not the Patient is the Subscriber (2000B) or Dependent (2000C).

    So, you must make PAT at least conditional on the Subscriber Relationship code, 18 or not 18.

    There is a rule on this in the schema.

    Wednesday, November 25, 2015 2:16 PM

All replies

  • Do you mean 278?

    Just a few things...

    1. The example above is not correct.  BHT must appear after ST.  It cannot appear before.
    2. If you're using the schema X12_00501_278.xsd as the target, there can be only one ST...SE, you cannot loop ST...SE in the transaction Schema.
    3. The most common source of these issues is not linking the source to destination with Looping functoids in the correct place.
    4. If you are working with the 278 transaction, be aware that the 278 is a patient level transaction and does not support looping at all.  Meaning, you cannot batch multiple subscriber/patient requests in a single ST...SE.
    5. The receiver can probably accept multiple ST...SE transactions within a single ISA/GS but you have to verify this.  Real-time interfaces mostly do not.

    To send multiple ST...SE transactions is a single ST...SE, you have to batch them.  There are two ways:

    Easiest: Use BizTalk EDI Batching: https://msdn.microsoft.com/en-us/library/bb245977.aspx?f=255&MSPPError=-2147217396

    Most control: Assembler an Interchange manually: http://social.technet.microsoft.com/wiki/contents/articles/26691.biztalk-server-working-with-preserve-interchange-edi-xml-part-1.aspx

    Monday, November 23, 2015 12:24 PM
  • Hi John,

    So now,what we need to do?
    I have tested Map in Visual Studio and output is good. Below is the snap.

    I have set SE segment in map and set the EDI pipeline Override property is ture so that correct Segment Count will be generated.

    If you will see above mentioned error for HL, PAT, PRE segment. Here i am generated 2000A loop and there is no PAT segment . It is in 2000C under 2000A loop.

    So what would you suggest at this level. If I need to generate separate ST-SE segment for each record and batch them in single ST-SE.

    Any help would be appreciated.


    If this post is helpful, please vote as helpful or marked as answer.


    Tuesday, November 24, 2015 4:25 AM
  • Ahh...ok.  This is the PACDR 837 transaction, not a 278.  That's a very important distinction.

    First, you don't need to do anything with the SE segment, it's handled automatically on the outbound.

    In the 837, you can loop at 2000A and 2000B so that's not a problem.

    The error is that PAT is missing.  Is it mapped from the source?

    Tuesday, November 24, 2015 8:20 PM
  • Yes John It's a PACDR 837 , No we mapped PAT segment based on some condition and it's working perfectly for single record but not for more than one record.


    If this post is helpful, please vote as helpful or marked as answer.

    Wednesday, November 25, 2015 4:34 AM
  • PAT will be generated in 2000C loop 2000A->2000B->2000C.

    if PAT is there then also file suspended for multiple records not for single record containing PAT segment.


    If this post is helpful, please vote as helpful or marked as answer.

    Wednesday, November 25, 2015 12:20 PM
  • Keep in mind, where the PAT segment must appear is dependent on weather or not the Patient is the Subscriber (2000B) or Dependent (2000C).

    So, you must make PAT at least conditional on the Subscriber Relationship code, 18 or not 18.

    There is a rule on this in the schema.

    Wednesday, November 25, 2015 2:16 PM
  • Correct John, We already have PAT segment conditional based on relationship_Code is 18 or not but in 837 Schema there is no PAT segment in 2000B loop.

    If Patient is dependent then we are generating 2000C and 2000C have PAT segment otherwise we are generating 2000B loop.


    If this post is helpful, please vote as helpful or marked as answer.

    Wednesday, November 25, 2015 5:19 PM
  • 2000B should have an optional PAT segment so that is a problem.

    Let me ask, where did you get this schema?  The x298 is not much different than the other 837's.  Did you try modifying an existing schema to match your trading partner's requirements?

    Wednesday, November 25, 2015 5:56 PM
  • HI John,

    Now we are creating individual edi per record. So now m trying to batch them in a single edi for this what i did.

    set EDI.BatchID=Get from Batch;
         EDI.TobeBatched = True;

    Set corelation to promote them.
    Send EDI /record to a destination folder.

    In Admin Console in Party configuration set batching name,and releasing method to shedule 2 minutes.
    Set batching filter with EDI.BatchID= 2(get from after batch save);

    now in send port set filter EDI.TobeBatched = False;

    EDI.BatchID = 2;

    When am getting individual edi in destination folder when droping file in rcv location.

    and a suspended message of BatchingOrchestration with error "Object not set to an instance".

    ANy help?


    If this post is helpful, please vote as helpful or marked as answer.

    Thursday, November 26, 2015 5:10 PM
  • Hi John,

    I am facing below issue.

    An output message of the component "Unknown " in receive pipeline "Microsoft.BizTalk.Edi.DefaultPipelines.EdiReceive, Microsoft.BizTalk.Edi.EdiPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" is suspended due to the following error:
         The interchange with id '00000----', with sender id '------', receiver id '-----      ' had structural error in/before the first functional group.
     The sequence number of the suspended message is 1.

    I have generated EDI 298 with above party id and recieve id.

    But when m trying to consume this edi message in biztalk it throw above error.

    Any help?


    If this post is helpful, please vote as helpful or marked as answer.

    Friday, November 27, 2015 10:03 AM
  • Since these are different issues, please open a new thread with different title.
    Friday, November 27, 2015 1:13 PM