Announcement

Collapse
No announcement yet.

Mirth 3.4 TCP Listener - Response settings - NCPDP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 ?

  • #2
    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

    Comment


    • #3
      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.

      Comment


      • #4
        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.

        Comment


        • #5
          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.

          Comment


          • #6
            Thank you!

            Thanks. It works!

            Comment

            Working...
            X