web stats
Getting the D_MC2 Message Id in Channel Destingation - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-31-2016, 06:26 AM
ea25 ea25 is offline
What's HL7?
 
Join Date: Oct 2016
Posts: 2
ea25 is on a distinguished road
Default Getting the D_MC2 Message Id in Channel Destingation

Our system currently archives messages and the File Pattern to build the filename includes the Message ID. This Message ID corresponds to the Message ID which is held in the D_MC2 table and the corresponding code is ${message.messageId}

Is it possible to get the same Message ID (residing in the D_MC2 table) so that it can be used in the JavaScript editor in the Destination script of the Channel. I do have a Message ID mapping listed under the Destination Mappings. However this translates to connectorMessage.getMessageId() which doesn't return the same value I'm after.

Thanks in advanced for your help.
Reply With Quote
  #2  
Old 10-31-2016, 07:43 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

That appears to work fine for me.
__________________
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
  #3  
Old 10-31-2016, 08:16 AM
ea25 ea25 is offline
What's HL7?
 
Join Date: Oct 2016
Posts: 2
ea25 is on a distinguished road
Default

Thanks narupley for getting back to me.

I take it that for you ${message.messageId} in the Archiving section and connectorMessage.getMessageId() in the Channel Destination section are both returning the Message ID from D_MC2 table.

For me, the connectorMessage.getMessageId() is returning a message id which its value is way smaller than the maximum id in D_MC2. Not sure how you got yours to work.
Reply With Quote
Reply

Tags
destination, d_mc2, mapping, message

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 11:41 PM.


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