Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

How to send response message upong receiving a HL7

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

  • How to send response message upong receiving a HL7

    I need to send a response message back to the sender upon receiving a HL7 message through the same connection.

    The response message looks like:

    MSH|^~\&|||Picis|PAV|20080107193626.0840-0500||ACK^S12|200801071936260840|P|2.3|||||
    EVN|S12|20071012091233
    MSA|AA|20071012091233|

    Thanks
    Kebin

  • #2
    Re:How to send response message upong receiving a

    Kebin,

    What type of inbound connection do you have this channel setup with? I found that it makes a difference. For LLP connections, it's automatic and very evident on the source tab. For TCP/IP, I had to create a secondary channel to process sending ACKs. It was not evident and it appeared that there are multiple ways to accomplish this.

    Kerry

    Comment


    • #3
      Re:How to send response message upong receiving a

      Kerry,
      I am using TCP listener for the inbound message, please show me the ways to send ack message.

      Thanks
      Kebin

      Comment


      • #4
        Re:How to send response message upong receiving a

        The incomming message is as following:

        MSH|^~\&|Picis|PAV|||20071012091233||SIU^S12|20071 012091233||2.3|||||
        EVN|S12|20071012091233||||
        PID||7060045|||TEST^CRYSTAL^^||19550520|M|||^^^^|| ||||||898789887||
        PV1||||||||||||||||||OP||||||||||||||||||||||||||2 00710150730|||||||||
        SCH||||||S12|||20||||||||||||||778|||
        AIS|1||^Cataract Extraction with IOL Phaco^^HEAD1640|200710150730|200710150730||20||||
        AIP|1||S80045||||0||||||
        AIL|1||^M2^^PAV|LDS||
        AIG|1||A_LEGPHAC^Legacy 20,000 Phaco|E||1||||||||
        AIG|2||PM_ZEISSO^Microscope Zeiss Ophthalmic|E||1||||||||

        Comment


        • #5
          Re:How to send response message upong receiving a

          I've created a test channel that may be a start for you. It has a TCP listener with no filter, no inbound transformer est. For the destinations, you have one that is ACK Writer, making an ACK message and sending it back to whatever TCP connection you want. The other would be used for your database, file, whatever. It sends to a file at the moment.

          You would need to set up a filter and what not, to assure you were sending and ACK for a message you wanted, etc.

          I hope this is a start. I abandoned this method and instead used an LLP listener for multiple client connections.

          Please note the Scripts also, there is something there that may be helpful as well.

          Kerry

          (file removed)

          Post edited by: chrisl, at: 01/09/2008 14:34

          Comment


          • #6
            Re:How to send response message upong receiving a

            Kerry,
            Thanks a lot for your help, your sample is good, but here is a misunderstanding. I need to send the ack message to the sender through the same socket (same port) before the connection is closed. This means the sender application sends the HL7 message to 9021 (in your sample), then wait for the ack message on the same socket.

            How ro accomplish this?

            Thanks
            Kebin

            Comment


            • #7
              Re:How to send response message upong receiving a

              Sorry, I thought you were having difficulty in creating the ACK message, which is what I had concentrated on. I believe there is a way to capture the socket info and use post processing scripts to handle this, but I haven't pursued it further, since LLP connections worked in my case.

              Perhaps someone else here can elaborate on another method to return ACKs on TCP/IP connections? I know it would be extremely valuable.

              Kerry

              Comment


              • #8
                Re:How to send response message upong receiving a

                Am I thinking to simple ???, just set Ack on New connection to NO ???? on the LLP-listner you are using as source. Are you using a LLP-listner or a TCP-listner ??

                Sorry you are using a TCP-listner, you already mentioned that.


                Post edited by: huubvandemortel, at: 01/09/2008 06:49

                Post edited by: huubvandemortel, at: 01/09/2008 06:52

                Comment


                • #9
                  Re:How to send response message upong receiving a

                  No, I have switched to using only LLP listeners. I have multiple sites sending data to the same port/listener.

                  It functions similarly to the TCP listener, (IP, port# etc).

                  Comment


                  • #10
                    Re:How to send response message upong receiving a

                    Hi Kerry,
                    Can you provide a sample by using LLP, which returns Ack message on the same connection?

                    Thanks
                    Kebin

                    Comment


                    • #11
                      Re:How to send response message upong receiving a

                      Sure, I hope this helps.

                      Please note the use of the deploy script for global variable declaration for the database connection in the destination. Also, I used a function in the transformer to add quotes around my values, as my database has timestamps that errored when NULL was the value...

                      (file removed)

                      Post edited by: chrisl, at: 01/09/2008 14:36

                      Comment


                      • #12
                        Re:How to send response message upong receiving a

                        Kerry,
                        What does the Ack message look like?

                        Can you attach the test message (ADT-A04 or ADT-A08)? I like too see the start char and end char of the message.

                        Thanks
                        Kebin

                        Comment


                        • #13
                          Re:How to send response message upong receiving a

                          Kebin look in this updated example for the transformer incoming tab. It has a message example.

                          The leading characters I think you're talking about are standard x0D etc from HL7 specs. I used one channel to make my messages in mirth and another to receive them to test this.

                          Kerry

                          This is the ACK that's generated...

                          Code:
                          MSH|^~\&|HPM|<sending_site>|<data_removed>|<data_removed>|||ACK|A20|P|2.3|
                          MSA|AA|20|
                          Please note, I removed the sending site id and the application id for security. test_HL7_Inbound-491d1d6fb9a4697aa91307f8000c0d6e.xml (43660 bytes)

                          Comment


                          • #14
                            Re:How to send response message upong receiving a

                            Kerry,
                            Where is the transformer incoming tab? I don't see the sample message.

                            Can you modified the Ack message? Because I do need customize the Ack message.

                            Thanks
                            Kebin

                            Comment


                            • #15
                              Re:How to send response message upong receiving a

                              I haven't tried modifying the ACK, there may be some other postings about that.

                              Look at the SOURCE tab, on the left, click Edit Transformer. Then on the right, look at the incoming data tab.

                              Kerry

                              Comment

                              Working...
                              X