Accessing msg object from Database Writer - rbeckman-nextgen/test-mc GitHub Wiki
Created by Jacob Brauer, last modified on Mar 23, 2009
(Thanks to the nice folks from WebReach who told me about this one)
The "msg" object (containing the HL7 message map) is not normally accessible from the Database Writer. This makes looping through multiple segments difficult if not impossible.
The solution is to import it from the channel map by using:
var msg = channelMap.get( 'msg' );
Then all of the Javascript recipes involving the msg object will work from the Database Writer.
Looks like this doesn't work anymore in latest Mirth Connect. However this seems to work.
![]() |
Document generated by Confluence on Nov 11, 2019 08:40