web stats
Filter to delete segment not working - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-30-2008, 05:31 PM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 728
jbartels is on a distinguished road
Default Filter to delete segment not working

I'm using a filter to correctly route a message containing routing information in a custom Z segment.

I'm able to set up the destinations to route it correctly but I'm unable to strip the Z segment off of the message before sending it on.

The filters correctly filter the messages per destination, but the Z segment isn't being removed despite a call to 'delete'.

Any ideas?????

The message looks like:
Code:
MSH|^~\&|SomeLab|LA01||R|200803260939|RESULTR01OUT|ORU^R01|080860346541|P|2.3|||AL|NE
PID|1|03845779|1813759^^^R^MR~1813759^^^B^MR~03845779^^^ST02^PI||ORDERS^KAREN||196505150000|F||||||||||0733730002^^^R|968741100
PV1|1|I||P|||12354^IMM^AMY|19901^PACK^CURTIS||MED|||||||12354^IMM^AMY|||U||||||||||||||||T||||||||200712030751|200803241708
ORC|RE|08080092029^LA01|08080092029^LA01|R0808000084^LA01|D||1^^^200803200924^^R||200803200924|DKG108||12354^IMM^AMY|RMH||200803260939|C_COLL^C: Collection error|3H^^SF
OBR|1|08080092029^LA01|08080092029^LA01|45958^IgG, IgA, IgM Immunoglobulins^RLA^45958^^LA01|R||200803200924|||DKG108||||200803200924|BLD&Blood^^^^^GOLD2&Gold2|12354^IMM^AMY||LR||||200803260939||IMU|F||1^^^200803200924^^R||||^^I9
OBX|1|ST|IGG^IgG^LA01|1|CANCELED|mg/dL^mg/dL|||||C||||||N
NTE|1|L|The released value 1500 was canceled by DKG108 on 03/26/2008 09:39
OBX|2|ST|IGM^IgM^LA01|1|CANCELED|mg/dL^mg/dL|||||C||||||N
NTE|1|L|The released value 200 was canceled by DKG108 on 03/26/2008 09:39
OBX|3|ST|IGA^IgA^LA01|1|CANCELED|mg/dL^mg/dL|||||C||||||N
NTE|1|L|The released value 150 was canceled by DKG108 on 03/26/2008 09:39
ZRT|12354^Imm^Amy^A^^^MD^A~12354^Imm^Amy^A^^^MD^O~19901^Pack^Curtis^B^^^DO^F~19901^Pack^Curtis^B^^^DO^R
And my filter looks like this:
Code:
if (msg['ZRT'].toString().indexOf("Imm") != -1)
{
delete msg['ZRT'];
return true;
}
else
{
return false;
}
__________________
Jon Bartels

Zen is hiring!!!!
http://consultzen.com/careers/
Talented healthcare IT professionals wanted. Engineers to sales to management.
Good benefits, great working environment, genuinely interesting work.
Reply With Quote
  #2  
Old 03-31-2008, 07:39 AM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 728
jbartels is on a distinguished road
Default Re:Filter to delete segment not working

Oh hell, this is why I shouldn't work from home.

Changes to the message should be done in the transformer and NOT the filter.

D'oh!! :whistle:
__________________
Jon Bartels

Zen is hiring!!!!
http://consultzen.com/careers/
Talented healthcare IT professionals wanted. Engineers to sales to management.
Good benefits, great working environment, genuinely interesting work.
Reply With Quote
  #3  
Old 09-04-2012, 03:27 PM
dhoang13 dhoang13 is offline
What's HL7?
 
Join Date: Feb 2011
Posts: 2
dhoang13 is on a distinguished road
Default

why don't you just use a single statement below on the transformed destination?

delete msg['ZRT'];
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete old files JasonGriffith Support 7 09-20-2016 10:36 AM
Need to delete OBX segments I don't need aht75 Support 14 08-15-2012 12:53 PM
Delete 'done' messages after x days magikbanana Support 3 09-22-2008 01:03 PM
How to delete a segment from message...? faisalamjad Development 1 04-28-2008 01:57 PM
Please delete this post jlehew Support 0 10-31-2007 02:45 PM


All times are GMT -8. The time now is 07:29 AM.


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