web stats
Filtering not working (does not recognize value of the filed) - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 11-30-2015, 05:09 AM
reymed reymed is offline
Mirth Newb
 
Join Date: Nov 2015
Posts: 6
reymed is on a distinguished road
Default [SOLVED] Filtering not working (does not recognize value of the filed)

Hi,

I am using Mirth Connect Server 3.3.0.7801. I have followed this tutorial to create channel where I am receiving HL7 message over LLP and I would like to pass it to the target application and to create JSON file if order is for specific procedure (1234). My filter looks like this:
Code:
if(msg['OBR']['OBR.4']['OBR.4.1'].toString() == 1234) 
{
	return true;
}
else
{
return false;
}
Funny thing is sometimes filter pass every message and sometimes filters every message.
I have also tried making filter with mapped field but it is the same. I am out of ideas. Thanks in advance.

Best regards

SOLUTION:

For some reason Mirth creating JS is not putting '' around value of comparison. When I changed JS to:
Code:
if(msg['OBR']['OBR.4']['OBR.4.1'].toString() == '1234') 
{
	return true;
}
else
{
return false;
}
it is now working

Last edited by reymed; 12-07-2015 at 12:56 AM. Reason: Soulution found
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 02:40 PM.


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