web stats
Mirth filter by date - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 12-26-2017, 01:57 AM
hazem hazem is offline
What's HL7?
 
Join Date: Dec 2017
Posts: 3
hazem is on a distinguished road
Default Mirth filter by date

hello mirth
I am novice in Mirth 3.5.
I create a channel that reads a database (openmrs) and translates it to HL7 in a file.
in the filter -destination part I write this javascript code, to receive only new patients (by date)
Code:
var dd = DateUtil.getCurrentDate("MMddyyyyHHmmss");
var  A02 = $(‘date_created’);
var  A011 = $(‘date_changed’)
if A02 = dd || A011 = DD
{
return true;
}
else
{
return false;
}
Thanks for your help
Reply With Quote
  #2  
Old 01-29-2018, 11:33 AM
ashishshetty1992 ashishshetty1992 is offline
What's HL7?
 
Join Date: Jan 2018
Location: Boston
Posts: 5
ashishshetty1992 is on a distinguished road
Default

What do you wish to know?
Reply With Quote
  #3  
Old 02-04-2018, 03:22 AM
ricber ricber is offline
OBX.3 Kenobi
 
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 174
ricber
Default

Hello,

try to change this line:

if A02 = dd || A011 = DD

for this

if (A02 == dd || A011 == DD)

Hope this helps,

RB
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 11:01 AM.


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