How to handle ‘&’

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf How to handle ‘&’

  • Creator
    Topic
  • #52371
    Ian Morris
    Participant

      Part of an OBX that leaves a source system contains the phrase “Signs & Symptoms”.

    Viewing 1 reply thread
    • Author
      Replies
      • #73950
        Steve MacDonald
        Participant

          We actually change them to the word ‘AND’.

          regsub -all {&} [inbound msg] “and” [outbound msg]

        • #73951
          Jim Kosloskey
          Participant

            Ian,

            The & is probably defined in the MSH-2 field and is the sub-component separator.

            So the sending system SHOULD be following the standard and escaping that (the escape character also in MSH-2 is probably ).

            There is a standard notation specified in the HL/7 standard for escaping the sub-component character no matter what the actual cahracter is. That notation is T (assuming is the escape character in MSH-2).

            Try contacting the source system and ask if they will follow the standard and escape separators appropriately.

            Then the receiving system needs to be able to reverse the escaping – or – you can do that with a proc after the Xlate.

            If the source system will not or cannot do the escaping for you then there are a lot of mechanisms (non of them as reliable as the escaping mechanism from the source) which can be deployed – including what Steve prorposed (although if you have any REAL sub-component separators in the message those will be lost with that technique).

            Even if you were to preserve the invalid sub-component character will the receiving system have similar problems?

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

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