Announcement

Collapse

NextGen (Mirth) Connect 3.10.0 Released!

NextGen (Mirth) Connect 3.10.0 is now available as an appliance update and on our GitHub page. This release includes better SQL Server database support, security improvements through fixes and library updates, and improvements for the Advanced Clustering plugin with a focus on improving performance of many of the tasks that are carried out on a frequent interval. 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

pass on Transformer generated output to Channel

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

  • pass on Transformer generated output to Channel

    Hi there:

    Mirth 1.5 with latest patch

    I am trying to transform ORU messages to DTF (flat files). For this I set up 2 channels:

    OUT_1_ORU: connector type: File Reader
    destination: Destination 1 -> File Writer
    destination: Destination 2 -> Channel Writer to OUT_2_DTF

    OUT_2_DTF: connector type: Channel Reader (incoming data set to XML)
    destination: Destination 1 -> File Writer

    Destination 2 contains the Transformer (all steps of type Message Builder). I realized that the output of the transformation is XML. So I intended to transfer XML to plain HL7 vertical bar encoded files with channel OUT_2_DTF.

    This gives me following error on OUT_1_ORU Destination 2:
    FAILURE: Error routing message
    RoutingException
    Failed to transform message before applying the filter. Failed to route event via endpoint:
    ...

    and following error on OUT_2_DTF Destination 1:
    ERROR-301: Transformer conversion error
    ERROR MESSAGE: Error adapting message
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
    ...

    Do I have an error in reasoning?
    It would be great if someone could let me know where to start. (Probably I misunderstood the use of Channel Writer - Channel Reader?)

    Thanks a lot in advance.
    Best wishes,
    Joe

  • #2
    Reass on Transformer generated output to Channel

    Hmmm, it seems that the transformed output of OUT_1_ORU isn't valid XML:
    <code>
    <HL7Message><MSH><MSH.1>|</MSH.1><MSH.2>^~\&amp;</MSH.2><MSH.3><MSH.3.1>TEST</MSH.3.1></MSH.3><MSH.4/><MSH.5><MSH.5.1>DPS</MSH.5.1></MSH.5><MSH.6/><MSH.7>&lt;MSH.7>&lt;MSH.7.1>20061017094234&lt;/MSH.7.1>&lt;/MSH.7></MSH.7><MSH.8/><MSH.9><MSH.9.1>DTF</MSH.9.1><MSH.9.2>P03</MSH.9.2></MSH.9><MSH.10>&lt;MSH.10>&lt;MSH.10.1>CW2006101709 42340001&lt;/MSH.10.1>&lt;/MSH.10></MSH.10><MSH.11><MSH.11.1>P</MSH.11.1></MSH.11><MSH.12><MSH.12.1>2.3</MSH.12.1></MSH.12></MSH><PID><![CDATA[<PID><PID.1/><PID.2/><PID.3><PID.3.1>123454</PID.3.1></PID.3><PID.4/><PID.5><PID.5.1>Muster</PID.5.1><PID.5.2>Chris</PID.5.2></PID.5><PID.6/><PID.7><PID.7.1>19700101</PID.7.1></PID.7><PID.8><PID.8.1>M</PID.8.1></PID.8><PID.9/><PID.10/><PID.11><PID.11.1/><PID.11.2/><PID.11.3/><PID.11.4/><PID.11.5/></PID.11><PID.12/></PID>]]></PID><PV1><![CDATA[<PV1><PV1.1/><PV1.2><PV1.2.1>I</PV1.2.1></PV1.2><PV1.3><PV1.3.1/><PV1.3.2/></PV1.3><PV1.4/><PV1.5/><PV1.6/><PV1.7/><PV1.8/><PV1.9/><PV1.10/><PV1.11/><PV1.12/><PV1.13/><PV1.14/><PV1.15/><PV1.16/><PV1.17/><PV1.18/><PV1.19><PV1.19.1>111222</PV1.19.1></PV1.19></PV1>]]></PV1><OBR><OBR.1/><OBR.2/><OBR.3/><OBR.4><![CDATA[<OBR.4><OBR.4.1>30030</OBR.4.1><OBR.4.2>Langzeit-EKG</OBR.4.2><OBR.4.3>L</OBR.4.3></OBR.4>]]></OBR.4><OBR.5/><OBR.6/><OBR.7/><OBR.8/><OBR.9/><OBR.10/><OBR.11/><OBR.12/><OBR.13/><OBR.14/><OBR.15/><OBR.16/><OBR.17/><OBR.18/><OBR.19/><OBR.20/><OBR.21/><OBR.22>&lt;OBR.22>&lt;OBR.22.1>20061017094234&lt ;/OBR.22.1>&lt;/OBR.22></OBR.22><OBR.23/><OBR.24/><OBR.25/><OBR.26/><OBR.27/><OBR.28/><OBR.29/><OBR.30/><OBR.31/><OBR.32/><OBR.33/><OBR.34/><OBR.35/><OBR.36>&lt;OBR.36>&lt;OBR.36.1>20061017094234&lt ;/OBR.36.1>&lt;/OBR.36></OBR.36><OBR.37/></OBR></HL7Message>
    </code>

    This output is generated by OUT_1_ORU Destination 2 set to File Writer
    with Template set to ${message.transformedData}

    BTW, when using Channel Writer I am not able to define which content to use in the generated message. What is used as standard Channel Writer output?

    Cheers,
    Joe

    Comment


    • #3
      Reass on Transformer generated output to Channel

      Ok, it seems that ${message.encodedData} is the way to go for OUT_1_ORU Destination 2 (working in File Writer mode).
      Only the message segments that were transformed are tagged now:

      Code:
      MSH|^~\&|TEST||DPS||<MSH.7><MSH.7.1>20061017094234</MSH.7.1></MSH.7>||DTF^P03|<MSH.10><MSH.10.1>CW200610170942340001</MSH.10.1></MSH.10>|P|2.3
      PID<PID><PID.1/><PID.2/><PID.3><PID.3.1>123454</PID.3.1></PID.3><PID.4/><PID.5><PID.5.1>Muster</PID.5.1><PID.5.2>Chris</PID.5.2></PID.5><PID.6/><PID.7><PID.7.1>19700101</PID.7.1></PID.7><PID.8><PID.8.1>F</PID.8.1></PID.8><PID.9/><PID.10/><PID.11><PID.11.1/><PID.11.2/><PID.11.3/><PID.11.4/><PID.11.5/></PID.11><PID.12/></PID>
      PV1<PV1><PV1.1/><PV1.2><PV1.2.1>I</PV1.2.1></PV1.2><PV1.3><PV1.3.1/><PV1.3.2/></PV1.3><PV1.4/><PV1.5/><PV1.6/><PV1.7/><PV1.8/><PV1.9/><PV1.10/><PV1.11/><PV1.12/><PV1.13/><PV1.14/><PV1.15/><PV1.16/><PV1.17/><PV1.18/><PV1.19><PV1.19.1>111222</PV1.19.1></PV1.19></PV1>
      OBR||||<OBR.4><OBR.4.1>30030</OBR.4.1><OBR.4.2>Langzeit-EKG</OBR.4.2><OBR.4.3>L</OBR.4.3></OBR.4>||||||||||||||||||<OBR.22><OBR.22.1>20061017094234</OBR.22.1></OBR.22>||||||||||||||<OBR.36><OBR.36.1>20061017094234</OBR.36.1></OBR.36>|
      How to get rid of the tags?

      My Transformer looks like this:

      Message Segment: tmp['MSH']['MSH.7']
      Mapping: msg['MSH']['MSH.7'].toString()

      Message Segment: tmp['MSH']['MSH.10']
      Mapping: msg['MSH']['MSH.10'].toString()

      Message Segment: tmp['PID']
      Mapping: msg['PID'].toString()

      Is it allowed to use a mapping like this when the whole PID segment should be remain in the output?

      Message Segment: tmp['PV1']
      Mapping: msg['PV1'].toString()

      Message Segment: tmp['OBR']['OBR.3']
      Mapping: msg['OBR']['OBR.3'].toString()

      Message Segment: tmp['OBR']['OBR.4']
      Mapping: msg['OBR']['OBR.4'].toString()

      Message Segment: tmp['OBR']['OBR.22']
      Mapping: msg['OBR']['OBR.22'].toString()

      Message Segment: tmp['OBR']['OBR.36']
      Mapping: msg['OBR']['OBR.36'].toString()

      Comment


      • #4
        Reass on Transformer generated output to Channel

        Sorry for posting multiple times. Have to stop my fingers from hitting the back button in the browser...

        Post edited by: hl7.sentinel, at: 06/19/2007 23:46

        Comment


        • #5
          Reass on Transformer generated output to Channel

          The channel is up and running now
          My problem was to use the wrong node for mapping, e.g. I wanted to keep PV1 so I used

          Message Segment: tmp['PV1']
          Mapping: msg['PV1'].toString()

          instead of all individual values that shall be kept:

          Message Segment: tmp['PV1']['PV1.3']['PV1.3.1']
          Mapping: msg['PV1']['PV1.3']['PV1.3.1'].toString()

          Message Segment: tmp['PV1']['PV1.3']['PV1.3.2']
          Mapping: msg['PV1']['PV1.3']['PV1.3.2'].toString()

          Message Segment: tmp['PV1']['PV1.3']['PV1.3.3']
          Mapping: msg['PV1']['PV1.3']['PV1.3.3'].toString()

          ...

          The generated HL7 message with content ${message.encodedData} now does not contain tags.

          Comment

          Working...
          X