Re: / in data generates another field

#57908
Terry Kellum
Participant

    Many vendors have ignored the part of the HL7 spec that talks about escape sequences for delimiters listed in MSH[2].  

    I think that you’ll find that you have problems with users using any of the chars that you have defined in MSH[2].

    Two choices.  Beat up the vendor with the HL7 spec….(Or any stout stick..)

    (Very satisfying, but does not always work.)

    Use TCL on the inbound message data field to REGSUB your worries away.

    Please see section 2.9 of the HL7 2.3 standard for escape sequences.

    Below code assumes that “” is the escape character, and that “/” is your “Sub Component” delimiter. (position 4 of MSH[2])

    Code:

    regsub -all {/} $field “T” newfield

    Of course, you’ll need to make sure that the vendor of the system on your outbound side supports HL7 escape sequences…

    (Whadda wanna bet they don’t….  Grab another stick!)