how to remove unwanted pipes in the middle of a segment?

Homepage Clovertech Forums Cloverleaf how to remove unwanted pipes in the middle of a segment?

  • Creator
    Topic
  • #120354
    Jason
    Participant

    so in one of the SIU messages we process, one of the sub-fields is a comment field and the upstream system allows pipes (|) to come through. Of course when they do it messes up the entire segment because it pushes down every other field thinking the pipes in the comment field are separators. Basically it’s like SQL-injection but with HL7 messages.

    is there anything I can do about this?

Viewing 2 reply threads
  • Author
    Replies
    • #120356
      Paul Bishop
      Participant

      There’s really not much you can do in a case like this since you don’t know how many pipes they put in the field.  You can try pushing back at the vendor who is creating the message and see if they can follow the HL7 standards for escaping any delimiter characters, which for the field separator would be “\E\” (assuming “|^~\&” in the MSH segment).

      I did get to thinking though, is this in the NTE segment?  If so, the number of fields is limited so you might be able to figure out which pipes are part of the comment.

      Paul Bishop
      Carle Foundation Hospital
      Urbana, IL

    • #120357
      James Nelson
      Participant

      What version of HL7 is it using?  HL7 v2.3 only has 3 fields defined in the NTE segment so you could, with a small risk, assume that any pipe character after the first 3 is part of the comment and use ‘string map’ within a tclproc to convert them to the appropriate escape sequence.  HL7 v2.5 has a fourth field, but that could be accounted for as well if you know the valid comment types.

    • #120358
      Charlie Bursell
      Participant

      If you know which subfield it is, it could be done in a pre-proc.

      However, it is much better to quote the HL7 spec to your vendor 🙂

       

Viewing 2 reply threads
  • You must be logged in to reply to this topic.

Forum Statistics

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