Reputation: 121
Mirth Connect V3.11.0
We are using HL7v2.X for Inbound and Outbound. The Outbound is HTTP Sender. We have a number of transforms happening to convert the data for our required format and this is working fine. Also we have some elements in Headers: that are exporting and work fine, but we need to be able to dynamically set the Headers depending on incoming HL7 data, and are hoping there is a way to access and set Headers in the Transformer. I see there is an option to "Use Map" in the HTTP Sender destination setup, and it is described as; "The Java Map specified by the following variable will be used to populate Headers. The map must have String Keys and either String or List values."
Question is, how do we make use of this? If I use the word Header in there, for instance.
Thank you.
Upvotes: 0
Views: 1031
Reputation: 121
The solution was found, by adding a key name into Source Transformer, and using that key in the Headers: HTML settings of HTTP Sender.
var aValue = "Something you want to export in Header";
channelMap.put('aValue', aValue);
Then add ${aValue} in Headers: Value box.
Upvotes: 1