web stats
Get response data from Channel in destination response transformer - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-31-2017, 09:17 AM
dtodo1paco dtodo1paco is offline
What's HL7?
 
Join Date: Aug 2016
Posts: 4
dtodo1paco is on a distinguished road
Default Get response data from Channel in destination response transformer

Hi

I'm developing some channels using Mirth Connect 3.4.2 and my schema could be simplified like this

Channel A: DB ---> dispatcher logic ---> sends to Channel B
Channel B: channel reader ---> completes some data ---> sends to Channel C
Channel C: channel reader ---> validates data and stores in db

Data types are
Channel A: HL7v2x HL7v2x
Channel B: HL7v2x XML
Channel C: XML XML

When Channel C stores data successfully builds a JSON object called "responseJSON" that is returned to Channel B.

What I want to do is evaluate responseJSON object in Channel B and return an appropiate MSA message to Channel A.

This is how dashboard looks like when selecting the connector on Channel B that connects to Channel C (requestF3 connector).



So, the response is well-formed and I need to read it in the requestF3 transformer.

I've tried a transformer in destination connector (from B to C) but I cannot access the response object (ERROR is "Reference not found").

I've also tried a postprocessor script, but all I can get from destination is "SENT: message routed successfully" but not the JSON response object returned by Channel C.

i'm pretty sure that Channel C is returning correctly the JSON object.

Please, any help will be really appreciated. I've lost my day searching the forum but found no solution.

Maybe the problem is the data types, but I need the HL7v2x type between Channel A and B.

Thanks in advance

Last edited by dtodo1paco; 02-01-2017 at 03:06 AM.
Reply With Quote
  #2  
Old 01-31-2017, 10:32 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

Post a minimal reproduction set of channels here, and it'll be easier for others to help troubleshoot.
__________________
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 02-01-2017, 03:09 AM
dtodo1paco dtodo1paco is offline
What's HL7?
 
Join Date: Aug 2016
Posts: 4
dtodo1paco is on a distinguished road
Default

I've added a screenshot to the original post message to help understand.
I just need to read response from requestF3 connector in its transformer/response/whatever
Reply With Quote
  #4  
Old 02-01-2017, 03:22 AM
dtodo1paco dtodo1paco is offline
What's HL7?
 
Join Date: Aug 2016
Posts: 4
dtodo1paco is on a distinguished road
Red face Solved

Ok, found. It's related to this http://www.mirthcorp.com/community/i...wse/MIRTH-3862

My response was not a JSON object but a Javascript variable

Quote:
Originally Posted by dtodo1paco View Post
I've added a screenshot to the original post message to help understand.
I just need to read response from requestF3 connector in its transformer/response/whatever
Reply With Quote
Reply

Tags
channels, destination connector, response

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 09:41 AM.


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