web stats
Custom metadata for filtered messages - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 11-18-2015, 12:57 AM
sbastianen sbastianen is offline
Mirth Newb
 
Join Date: Sep 2014
Location: The Netherlands
Posts: 8
sbastianen is on a distinguished road
Default Custom metadata for filtered messages

Hi all,

As you know, you can add custom metadata to a channel for advanced search and filter possibilities. However, things get odd when a message is filtered by the source connector.

When a message is filtered by the source connector, the variable mappings are initialized yet. This causes that the variable that you've mapped in the custom metadata will be filled with the variable value of the last message that was not filtered. It seems to me that this behavior is a kind of weird; Am I misusing this functionality?

In case my message remains unclear to you; If you need any additional information, please let me know.

Thanks in advance!
Cheers,
Sven
Reply With Quote
  #2  
Old 11-18-2015, 06:28 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,098
narupley is on a distinguished road
Default

That's probably because you're using the global channel or global map to house your variables. Use the channel map instead, or connector map if you want variables to be specific only to a single connector.

It's true that if the filter does not pass, the transformer will not be run. But you can still map variables in the filter. Unfortunately there's no Mapper step type there, but you can still easily do it with a JavaScript step:

Code:
channelMap.put('mrn', msg['PID']['PID.3']['PID.3.1'].toString());
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
Reply

Tags
custom, filter, metadata

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:10 AM.


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