web stats
Mirth 3.4 TCP Listener - Response settings - NCPDP - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 11-14-2016, 08:24 AM
neoxandres neoxandres is offline
What's HL7?
 
Join Date: Feb 2014
Posts: 3
neoxandres is on a distinguished road
Lightbulb Mirth 3.4 TCP Listener - Response settings - NCPDP

Hi!

I'm trying to setup a TCP mirth connection, where a socket client sends a NCPDP message to Mirth, Mirth processes the NCPDP message and responds a XML to the client in the same connection.

This is my configuration:

1. Summary Tab


2. Source Tab


3. Destinations Tab


4. The Client request (NCPDP Message) and response (NULL)


5. Mirth LOG Request


6. Mirth Log Response


I don't know how to setup Mirth to send me back the XML response to my socket client after Mirth processed the NCPDP. Can you please help me or give any way ?
Reply With Quote
  #2  
Old 11-15-2016, 11:57 PM
amble amble is offline
OBX.2 Kenobi
 
Join Date: Nov 2015
Posts: 91
amble is on a distinguished road
Default

Should just be able to use 'edit response', change your data types and do some mapping?

Step 1: Edit Response


Step 2: Edit data type and map templates
Reply With Quote
  #3  
Old 11-16-2016, 06:41 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,115
narupley is on a distinguished road
Default

You have the response set to Auto-generate, which right now is only implemented for the HL7 v2.x data type. Instead, yes you can use a response transformer to modify the response, create your own custom XML, whatever. Then in the source Response setting choose the destination you want to respond from.

Alternately you could also choose Postprocessor, and then build up a custom response that you return in the postprocessor script.
__________________
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
  #4  
Old 11-30-2016, 11:41 PM
neoxandres neoxandres is offline
What's HL7?
 
Join Date: Feb 2014
Posts: 3
neoxandres is on a distinguished road
Question Get the complete processed message string in the Post-processor channel

I'm following the Narupley's suggestion

"Alternately you could also choose Postprocessor, and then build up a custom response that you return in the postprocessor script. "


This is the Post-processor screen:


----------------

Now my custom socket is receiving the post-processor response string


----------------

Is a way to get the complete processed message string in the Post-processor channel?

1. MyCustomSocket send a NCPDP message to Mirth
2. Mirth receive this NCPDP message and convert it to XML
3. In the post-processor channel I need to return the processed XML string
4. Mirth return this "processed XML string" to my MyCustomSocket as response.

For testing purpose I'm returning a "The processed message string", but I need the complete XML response string instead.
Reply With Quote
  #5  
Old 12-01-2016, 07:46 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,115
narupley is on a distinguished road
Default

Sure, try doing this:

Code:
return message.getConnectorMessages().get(0).getEncodedData();
__________________
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
  #6  
Old 12-01-2016, 03:01 PM
neoxandres neoxandres is offline
What's HL7?
 
Join Date: Feb 2014
Posts: 3
neoxandres is on a distinguished road
Thumbs up Thank you!

Thanks. It works!
Reply With Quote
Reply

Tags
listener, message, mirth, response, tcp

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:29 AM.


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