"/" causing the engine to create an extra field

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf "/" causing the engine to create an extra field

  • Creator
    Topic
  • #48175
    Rentian Huang
    Participant

      Greetings Cloverleafers!!!

      – V5.2 on AIX

      We recently got an Fetch failure on ‘{IF data fetch produced multiple values.}’ error.

      After investigation, we found out that a “/” entered by user was the criminal of the problem. The engine creates another extra field for the “/” entered, causing all subsequence fields to right-shift one position which mess up all data.

      Since “/” is NOT the field sep nor does it belongs to any of the encoding charactors, why does the engine do that? Has anyone have the same xp? Any suggested fix??

      Thanks in advance!

      Sam

    Viewing 1 reply thread
    • Author
      Replies
      • #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!)

        • #57909
          Rentian Huang
          Participant

            Thanks for your input Terry, I will look more into the problem and upd you if I found a solution.

            Sam  ðŸ™‚

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