Announcement

Collapse
No announcement yet.

Use of Inbound and Outbound templates in transformer

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

  • Use of Inbound and Outbound templates in transformer

    Hi folks,

    I am a newbie to mirth and sincerely stucked with significance of inbound and outbound message templates in a channel. Also can anyone tell me the steps of provide an example for transforming an XML from one format to another. Any help will be highly appreciated.

    Thanks and Regards,
    Dheeraj Bansal
    Thanks and Regards,
    Dheeraj Bansal

  • #2
    Hi Dheeraj,

    Mirth Connect helps you create message mappings and transforms "by example". The inbound template represents the incoming message. When you paste in a sample message, and drag the segments over from the tree to create mapping steps, you're essentially telling Mirth Connect that you are expecting to receive a message that looks like the inbound template (that is, has the same segments). Since the inbound template is just an "example", none of the data from the template is used, just the mappings that were created. You would use an inbound template when you want to extract segments or modify an incoming message.

    The outbound template is used to specify the outgoing message format. By providing an outbound template, you are telling Mirth Connect that you want your outgoing message to look different from your incoming message. In this case, the content of the outbound template is exactly what is going to be sent, so you'll want to make sure that you clear out any data that you wouldn't want to be sent with every message. Once you've pasted in an outbound template, you can use the Message Builder step type to modify the message however you want. The most common way to do this is to paste in both an inbound and an oubound template, and then drag-and-drop from a segment in the inbound to a segment in the outbound. This will create a new step that takes the data from the incoming message and inserts it into the outgoing message.

    In your case, since you're using XML, just paste your original structure into the inbound template and the desired structure into the outbound template. Then, drag-and-drop the desired segments from the inbound to the outbound. When the channel is deployed and receiving XML messages, it will create a new outbound message (based on the template), replace all of the segments with the incoming data (based on your mapping), and send it out to your destinations.

    Hope this helps.
    Gerald Bortis | Chief Information Officer | Mirth Corporation

    Comment


    • #3
      Also, you can find an example of using the Message Builder step on the community wiki.
      Gerald Bortis | Chief Information Officer | Mirth Corporation

      Comment


      • #4
        This is called as solution to a problem. Thanks it helped a lot and cleared the air.
        Once again thanks.
        Thanks and Regards,
        Dheeraj Bansal

        Comment


        • #5
          Hi,

          I suppose the above solution is for a fixed structure result message and not for the dynamic result.

          I want to send a result with multiple segment of OBR and NTE and their numbers (OBR and NTE segments number) must be based on the number what I am receiving in my order message.

          Can It be done using javascript without doing any manual mapping??

          Please reply with some solution.

          Comment


          • #6
            Originally posted by Divs View Post
            Hi,

            I suppose the above solution is for a fixed structure result message and not for the dynamic result.

            I want to send a result with multiple segment of OBR and NTE and their numbers (OBR and NTE segments number) must be based on the number what I am receiving in my order message.

            Can It be done using javascript without doing any manual mapping??

            Please reply with some solution.


            Does anyone have a solution for this, similar problem to what I am having right now....

            Comment


            • #7
              Anyone have a solution for the previous post about a dynamic solution. I'm having the same issue...

              Comment


              • #8
                NTE|this is a note
                NTE|this is another note

                If you drag drop, you will have something like this...

                msg[NTE][NTE.1] ...

                if you have multiple

                foreach (ntecount in msg[NTE]) {
                msg[NTE][ntecount][NTE.1]
                }

                syntax may be off a little. I have done this in awhile and I don't have complete access yet.

                Comment


                • #9
                  Recommended to start a new thread with information about your specific problem.

                  Comment

                  Working...
                  X