web stats
Mirth filter by date - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 12-26-2017, 02: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)
var dd = DateUtil.getCurrentDate("MMddyyyyHHmmss");
var  A02 = $(‘date_created’);
var  A011 = $(‘date_changed’)
if A02 = dd || A011 = DD
return true;
return false;
Thanks for your help
Reply With Quote
Old 01-29-2018, 12:33 PM
ashishshetty1992 ashishshetty1992 is offline
Mirth Newb
Join Date: Jan 2018
Location: Boston
Posts: 17
ashishshetty1992 is on a distinguished road

What do you wish to know?
Reply With Quote
Old 02-04-2018, 04:22 AM
ricber ricber is offline
Mirth Guru
Join Date: Jun 2007
Location: Barcelona, Spain
Posts: 185


try to change this line:

if A02 = dd || A011 = DD

for this

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

Hope this helps,

Reply With Quote

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:05 PM.

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