web stats
Removing line break in OBR.31 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-12-2019, 03:18 AM
sri24 sri24 is offline
Mirth Newb
 
Join Date: Apr 2017
Posts: 17
sri24 is on a distinguished road
Default Removing line break in OBR.31

Hi

Receiving order message/OBR.31 as below and I wanted to transmit message without.\.br\

OBR||601936428|601936428|1-CXR^Chest|||201901090308|||||||||ECVRNSV6^COOS^ED| |601936428||||||Plain Film|||^^^^^A||||^demenia pt.\.br\? fall, ? hi #|||^^^^ED^^SRH

please advise...
Reply With Quote
  #2  
Old 01-12-2019, 08:45 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 598
agermano is on a distinguished road
Default

\.br\ is the HL7 escape sequence for a line break. The period preceding it is not part of the sequence. It was probably entered as:

Code:
demenia pt.
? fall, ? hi #
You probably want to at least convert them to a space rather than removing entirely to preserve readability.

Code:
for each (var obr in msg.OBR) {
    obr['OBR.31']['OBR.31.2'] = obr['OBR.31']['OBR.31.2'].toString().replace(/\\\.br\\/g, ' ');
}
Reply With Quote
  #3  
Old 01-13-2019, 12:44 AM
sri24 sri24 is offline
Mirth Newb
 
Join Date: Apr 2017
Posts: 17
sri24 is on a distinguished road
Default

Thank you

That's what i wanted and it is working.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:32 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation