Extreme newbie to X12

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Extreme newbie to X12

  • Creator
    Topic
  • #47788
    Michael Lacriola
    Participant

      Very odd for me, but I’m looking to determine how to split X12 messages. HL7 normallly uses r between segments and | between fields. What does X12 normally use? I believe I’m seeing ~ for segment splits and * for field splits.

      Any particular rules I need to follow?

      Does this sound good to anyone. Help — I’m drowning in a sea of asterisks….

    Viewing 5 reply threads
    • Author
      Replies
      • #56713
        Charlie Bursell
        Participant

          *ALWAYS* get the separator characters from the ISA element.  The ISA element consist of all fixed width fields (105 bytes).  It is the only element that way.  Therefore, your field sep would be in character 3 (0-based), element sep is character 105 and component sep is character 104.

        • #56714
          Michael Lacriola
          Participant

            Thanks Charlie. A big help. I’ll take a look at the ISA thingy and do Tcl code.

          • #56715
            Dennis Pfeifer
            Participant

              Thought I’d add to this thread with a question..

              in a realtime 270 interface to CL, I have four options .. which does CL prefer?

              3-NO NEW LINES & NO CARRIAGE RETURNS

              2-ONE MESSAGE PER LINE, CARRIAGE RETURN AT END OF MESSAGE

              1-ONE MESSAGE PER LINE, LINE FEED AT END OF MESSAGE

              0-ONE SEGMENT PER LINE

              Thanks

              Dennis

            • #56716
              Charlie Bursell
              Participant

                Cloverleaf internally deals with messages not files.  The same rules apply as would apply to a file of HL7 messages.  If more than one per file, tell Cloverleaf or handle it in Tcl by splitting into messages.

                The difference in X.12 messages is that the Headers (ISA/GS) and trailers (IEA/GE) elements must be stripped off prior to translation.  Translate should only deal with transaction (ST .. SE) elements.

                If there are many transactions – I have seen thousands in a file – I prefer to use Tcl and split into individual transactions and process them that way rather than having the Xlate engine loop through them.  Seems faster that way.

                FWIW, LF or CR can be used as legitimate element separtors although you usually see ~.

                Don’t know if this answers your question but it depends on what you are trying to do.  Like in other areas of implementation there is no one size fits all

                I guess that’s why you get paid the big bucks to figure it out  ðŸ˜‰

              • #56717
                Dennis Pfeifer
                Participant

                  ok .. me again! ..

                  What I’m asking .. is .. does X12 in the TCP/IP world have something similar to MLP ..

                  where messages begin witn 0B and end with 1C 0D

                  or .. is it simply what the two parties agree upon?

                  Dennis

                • #56718
                  Jim Kosloskey
                  Participant

                    Dennis,

                    In my limited experience I have always been successful using length-encoding.

                    Jim Kosloskey

                    email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

                Viewing 5 reply threads
                • The forum ‘Cloverleaf’ is closed to new topics and replies.