web stats
Mirth Community - View Single Post - Get response data from Channel in destination response transformer
View Single Post
Old 01-31-2017, 10: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


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 04:06 AM.
Reply With Quote