Today I spent waaaaay tooooo long trying to pass data between Mirth Channels.
So, I had two channels: Channel 1 and Channel 2 (Put Orders 7B).
Channel #1 had a user’s identification that Channel #2 absolutely needed! I didn’t want to send it in the template area. I wanted that user id to be sent on its own – for Channel #2 to easily access.
I did find the following Mirth forum posts related to this task – but that’s it. It just wasn’t 100% clear on how to do this – though it was helpful.
- I want to send a file’s original filename thru it to the next channel in the chain. In Channel Writer Settings I’ve been trying to add variable originalFilename in the Message Metadata section, but I can’t get it to stick.
So, number 2 above had an image – which finally led me to the answer! Yaaaaaayyyyy…..!!!!
Ok, here’s how I did it – finally It was actually easy…lol!
My source channel:
- Destination Connector: Set to channel writer:
- Channel ID: Set this to the channel that you will be sending data to (Put Orders 7B).
- Message Metadata: Added my channel’s variable as new entry (outUserID). This variable was set in my destination’s source transformer. This also works with a variable set in the channel’s source transformer.
I sent a message through my source channel, then checked my destination channel’s source mappings.
So, just have to configure your source channel settings. Once you send a message through, the destination channel will receive that data in the Mappings tab > Source scope!
Now, I can use this user ID in my destination channel!
Hope this helps!