Sidebar

Incoming text with hl7 does not contain line feeds or carriage returns, how do i add separate the segments correctly?

0 votes
986 views
asked Mar 31, 2018 by (220 points)
The incoming message is received as XML with the hl7 in content.  However, the content they send do not have line feeds or carriage returns to separate the segments, it reads the entire line under MSH.  How would i go about separating the segments correctly?

1 Answer

0 votes
 
Best answer
This is an interesting situation to have and one that does not have a simple answer. According to the HL7 specification, there should be a separator of 0D at the end of each segment. Our recommendation would be to have you go back to the sending entity to add the delimiter into the message. The only other option would be to process the message as Text and then using Regexp try to parse the message into individual segments and save each segment onto their own variables wherein you could combine them back together as an HL7 message with the 0D separator.
answered Apr 2, 2018 by gary-t-8719 (14,860 points)
selected May 1, 2018 by
...