1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
1.4K views
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.
by gary-t-8719 (15.1k points)
selected by
...