Carriage returns not recognized as segment terminators in OMRS core HL7 service

We are using the OMRS core Hl7service to parse our HL7 message, but are receiving an error related to the parsing of the message.

when we run parseHL7String, we are getting an error where the carriage return (which is the segment terminator) is not being recognized. We have tried “\n”, “\r”, “\r\n” in the HL7 message and none have worked - Does anyone know the correct way to code the carriage return so that the OMRS HL7Service parser will recognize it as a segment terminator?

@dkayiwa @ibacher

1 Like

@janflowers @moshon

@ccwhite23 do you mind sharing the full stack trace as it appears in the log?

1 Like

The HAPI library is used. The segment delimiter for ER7 (pipe delimited) message is ASCII 13 (carriage return).

2 Likes

Thanks @burke it works!