web stats
access to message id in a channel's source - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-09-2009, 05:10 AM
csmith csmith is offline
OBX.2 Kenobi
 
Join Date: Mar 2009
Posts: 57
csmith is an unknown quantity at this point
Default access to message id in a channel's source

Hi:

We use MirthConnect to get lab results into OpenClinica. We also use Mirth to report out of OpenClinica. You can read about what we do here http://clinicalresearch.wordpress.co...vices-feature/

We're thinking about ways to more fully integrate the two applications to make things more seamless. Right now, for instance, you have to log into Mirth's admin interface to check on the delivery status of a report derived from results stored in OpenClinica. This is only natural, but it would be nicer to do so within the context of OpenClinica's web interface so people don't have to log into two different interfaces to check up on things.

So, I suppose, the best way to proceed is to make OpenClinica's database aware of Mirth's. This brings me to my question: can I access the variable ${message.id} within the Source code of a channel? I realize I can do so within a channel's Destination specification, but I'm unclear if I can do so in its Source. My plan is to create a table named 'reportage' that will house both message_id (from Mirth) and event_crf_id (from OpenClinica) and that will be populated using the 'Run On-Update Statement' utility provided in Source (specifically, Database Reader). This table will link events in OpenClinica with messages in Mirth and will thereby provide a means of looking up reporting status within the context of OpenClinica (or, for that matter, events within the context of Mirth).

Thanks (as always)!
Reply With Quote
  #2  
Old 09-09-2009, 04:11 PM
jacobb jacobb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 1,218
jacobb is an unknown quantity at this point
Default

Quote:
Originally Posted by csmith View Post
Hi:

We use MirthConnect to get lab results into OpenClinica. We also use Mirth to report out of OpenClinica. You can read about what we do here http://clinicalresearch.wordpress.co...vices-feature/

We're thinking about ways to more fully integrate the two applications to make things more seamless. Right now, for instance, you have to log into Mirth's admin interface to check on the delivery status of a report derived from results stored in OpenClinica. This is only natural, but it would be nicer to do so within the context of OpenClinica's web interface so people don't have to log into two different interfaces to check up on things.

So, I suppose, the best way to proceed is to make OpenClinica's database aware of Mirth's. This brings me to my question: can I access the variable ${message.id} within the Source code of a channel? I realize I can do so within a channel's Destination specification, but I'm unclear if I can do so in its Source. My plan is to create a table named 'reportage' that will house both message_id (from Mirth) and event_crf_id (from OpenClinica) and that will be populated using the 'Run On-Update Statement' utility provided in Source (specifically, Database Reader). This table will link events in OpenClinica with messages in Mirth and will thereby provide a means of looking up reporting status within the context of OpenClinica (or, for that matter, events within the context of Mirth).

Thanks (as always)!
I think messageObject.getId() will work from a JavaScript context. However, I don't think there is a Message ID yet anywhere on the source connector. It does make sense that there should be one when running the on-update statement, but I don't believe it is in the scope at that point. An easy solution would be to run whatever other update you need to run in the source connector as a JavaScript step, using messageObject.getId().
__________________
Jacob Brauer
Director, Software Development
NextGen Healthcare

Reply With Quote
Reply

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 10:50 AM.


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