web stats
Unable to add new field in OBR segment - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-10-2019, 01:37 PM
Kogan20 Kogan20 is offline
Mirth Newb
Join Date: Mar 2019
Location: Sydney, Australia
Posts: 8
Kogan20 is on a distinguished road
Unhappy Unable to add new field in OBR segment

Hi Everyone,

I am new to Mirth,

Got an opportunity to work in Mirth recently to add an entry in the OBR field. With the help of this forum, I was able to edit an existing data, that works perfectly fine. But failing to add a data to a field which doesn't exist in the source HL7. Below is the example,


PV2|||||||System Alert Off~0437689973~ABC-KOTHAI-AUS
In the DestinationHL7, I want to check if PV2.7.2 has "KOTHAI", if yes, then update the OBR.16 as below

With the below Javascript, I am able to see the last value in OBR is changed as M but no "KOTHAI" is available. I could see the change in Transformed data but not in Encoded data. Could you let me know what am I doing wrong.

var code = tmp['ORU_R01.PATIENT_RESULT']['ORU_R01.PATIENT']['ORU_R01.VISIT']['PV2']['PV2.7'][2].toString();
if (code.indexOf("ARSTALL") != -1 )

}else {

Reply With Quote

hl7 message, javascript transformer, mirth

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 04:31 AM.

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