No announcement yet.

Custom metadata for filtered messages

  • Filter
  • Time
  • Show
Clear All
new posts

  • 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!

  • #2
    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:

    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.