Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Handling carriage return in the HL7 router

Question
Ahmad Bukhtiar · Jan 19, 2021

Handling carriage return in the HL7 router

We have msgs coming like below where line ending with \n then it throw error in router production but if msgs come with \r\n then router dont throw error.

any help?

EMR sending following msg.

MSH|^~&|APP|EMR|HIE|HIE|201301011226||ADT^A01|MSG00001|P|2.5|\n
EVN|A01|201301011223||\ne

Business Service read it like this as on line, and error msg shows in trace.

MSH|^~&|APP|EMR|HIE|HIE|201301011226||ADT^A01|MSG00001|P|2.5|\nEVN|A01|201301011223||\n

 

Build Map Status = 'ERROR <EnsEDI>ErrMapRequired: Missing required EVN element at segment 2'
'ERROR <EnsEDI>ErrMapRequired: Missing required PID element at segment 2'
'ERROR <EnsEDI>ErrMapRequired: Missing required PV1 element at segment 2'

#HL7 #Ensemble #HealthShare
Product version: HealthShare 2020.2

Source URL:https://community.intersystems.com/post/handling-carriage-return-hl7-router