Announcement

Collapse
No announcement yet.

How to Store response ACK to a file in mirth

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

  • How to Store response ACK to a file in mirth

    I have one channel, When I send message to destination I got response ACK in mirth. I want to store that ACK in a file. So how can we store response ACK to file in Mirth.

  • #2
    Store the response to a channel map variable, and create a destination to store the variable to a file.
    Best,

    Kirby

    Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

    Appliance Version 3.11.4
    Mirth Connect Version 3.8.0
    Java Version 1.6.0_45-b06
    Java (64 bit) Version 1.6.0_45-b06
    Java 7 (64 bit) Version 1.7.0_151-b15
    Java 8 (64 bit) Version 1.8.0_181-b13
    PostgreSQL Version 9.6.8

    Comment


    • #3
      @Kirby : how do you store the response to a channel map variable?

      Comment


      • #4
        Look at the response transformer section in the manual or API
        Best,

        Kirby

        Mirth Certified|Epic Bridges Certified|Cloverleaf Level 2 Certified

        Appliance Version 3.11.4
        Mirth Connect Version 3.8.0
        Java Version 1.6.0_45-b06
        Java (64 bit) Version 1.6.0_45-b06
        Java 7 (64 bit) Version 1.7.0_151-b15
        Java 8 (64 bit) Version 1.8.0_181-b13
        PostgreSQL Version 9.6.8

        Comment


        • #5
          Not sure if this is what you are looking for:

          On Response Transformer store response.getMessage() on a variable and
          copy with fileUtil.write


          PHP Code:
          //Copiamos RSP a variable
          var respuesta response.getMessage();
          var 
          rsp = new XML(SerializerFactory.getSerializer('HL7V2').toXML(respuesta));


          var 
          output =  "/RSP/" + $('NHC') + "_" DateUtil.getCurrentDate('yyyyMMddHHmmss') + ".hl7";
              
          FileUtil.write(outputfalsersp ); 


          Hope this can help you

          Comment


          • #6
            Not sure if this is what you are looking for:

            On Response Transformer store response.getMessage() on a variable and
            copy with fileUtil.write


            PHP Code:
            //Copiamos RSP a variable
            var respuesta response.getMessage();
            var 
            rsp = new XML(SerializerFactory.getSerializer('HL7V2').toXML(respuesta));


            var 
            output =  "/RSP/" + $('NHC') + "_" DateUtil.getCurrentDate('yyyyMMddHHmmss') + ".hl7";
                
            FileUtil.write(outputfalsersp ); 


            Hope this can help you

            Comment

            Working...
            X