Encoding characters in HL7

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Encoding characters in HL7

  • Creator
    Topic
  • #52581
    Tom Canavan
    Participant

    I’m looking for a way to convert encoding characters through the interface or tcl. I have a system sending messages with colon as the field separator and semi-colon as the sub-field separator (:;). The system on the outbound side only accepts pipe and caret (|^).

    I’m wondering if there are any settings I’m not familiar with to use a different outbound separator set or should I write a tcl script to convert the characters at the tps inbound time. I know that this could be a problem because the inbound system could possibly have a pipe or caret in the data but it’s been decided that this is unlikely.

Viewing 4 reply threads
  • Author
    Replies
    • #74764
      David Barr
      Participant

      You’ll probably have to write a TCL proc. Other than pipes and carets in the data, you’ll also have to look out for escape sequences. F will have to be translated to ‘:’ and S will have to be translated to ‘;’.

      I looked at the code that we use, and it looks like we ignore those issues. We do this:

      Code:

             set mymsg [msgget $mh]
             regsub -all {:} $mymsg {|} newfmt1
             regsub -all {;} $newfmt1 {^} newfmt2
             msgset $mh $newfmt2
             lappend dispList “CONTINUE $mh”

    • #74765
      Jim Kosloskey
      Participant

      Tom,

      If you are using Xlates, simply change the MSH-1 and/or MSH-2 on the outbound message in the Xlate to what you want. All of the encoding characters in the outbound message will now have the new characters. The Xlate will do that for you.

      As far as any escaped sequences those by design are character agnostic (unless you use the reserved escape representation characters like the T in T for the sub-component separator-  as your encoding characters) and the receiving system will need to resolve those. If the receiving system cannot resolve escaped sets then you can use Tcl – but that might hose up the receiving system parser.

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

    • #74766
      Tom Canavan
      Participant

      Thanks David. That’s an option for me.

      I’m going to go with Jim’s plan first. I had thought that the outbound separator characters were controlled by the inbound. This is easier than anything else I was considering.

    • #74767
      Lisa Heaton
      Participant

      I’m a little unsure how to do the xlate portion  . . .

      Does this work the same as X12 as HL7?

      MSH-1 “to be what you want”

      Can someone help.

    • #74768
      Levy Lazarre
      Participant

      Lisa,

      For example, to change the delimiters to the standard HL7 delimiters (pipe and caret), you would do the following in the Xlate:

      Code:



      OPERATION                       DESTINATION

      COPY =|                         0(0).MSH.#1

      COPY =^~&                      0(0).MSH.#2

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

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,293
Replies
34,435
Topic Tags
286
Empty Topic Tags
10