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

ERROR-300: Transformer error

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

  • ERROR-300: Transformer error

    Hello to all,

    I'm using Mirth 1.7.1.3422, i'm taking incoming HL7 messages and write them to a Oracle Database.

    I want split the incoming messages to two outbound channels ( ORM and ADT Messages ):

    Therefore i built an inbound channel (Destinations - Connectortype : Channel Writer - Channelname: None )

    I added a new transformer ( type Javascript )


    I'm using the javascript code below:


    ================================================== =========

    if (msg['MSH']['MSH.9']['MSH.9.1'].toString()== "ORM"){
    router.routeMessage(outpound_hl7log_ORM, 'message');
    }

    if (msg['MSH']['MSH.9']['MSH.9.1'].toString()== "ADT"){
    router.routeMessage(outpound_hl7log_ADT, 'message');
    }
    ================================================== =========

    when i try to transform the message i get following error message :


    ERROR-300: Transformer error
    ERROR MESSAGE: Error evaluating transformer
    com.webreach.mirth.server.MirthJavascriptTransform erException:
    CHANNEL: inbound_KL0802135_hl7log
    CONNECTOR: outbound
    SCRIPT SOURCE:
    LINE NUMBER: 3
    DETAILS: ReferenceError: "outpound_KL0802135_hl7log_ORM" is not defined.
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateScript(JavaScriptTransform er.java:439)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:346)
    at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)
    at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
    at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)
    at com.webreach.mirth.server.controllers.MessageObjec tController.getMessageObjectFromEvent(MessageObjec tController.java:507)
    at com.webreach.mirth.connectors.vm.VMMessageDispatch er.doSend(VMMessageDispatcher.java:248)
    at org.mule.providers.AbstractMessageDispatcher.send( AbstractMessageDispatcher.java:166)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:191)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:130)
    at org.mule.routing.outbound.AbstractOutboundRouter.s end(AbstractOutboundRouter.java:85)
    at org.mule.routing.outbound.FilteringMulticastingRou ter.route(FilteringMulticastingRouter.java:89)
    at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(OutboundMessageRouter.java:78)
    at org.mule.transaction.TransactionTemplate.execute(T ransactionTemplate.java:48)
    at org.mule.routing.outbound.OutboundMessageRouter.ro ute(OutboundMessageRouter.java:82)
    at org.mule.impl.model.DefaultMuleProxy.onCall(Defaul tMuleProxy.java:247)
    at org.mule.impl.model.seda.SedaComponent.doSend(Seda Component.java:209)
    at org.mule.impl.model.AbstractComponent.sendEvent(Ab stractComponent.java:277)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:201)
    at org.mule.routing.inbound.InboundMessageRouter.send (InboundMessageRouter.java:161)
    at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:128)
    at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:493)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:272)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:231)
    at com.webreach.mirth.connectors.vm.VMMessageReceiver .getMessages(VMMessageReceiver.java:157)
    at org.mule.providers.TransactedPollingMessageReceive r.poll(TransactedPollingMessageReceiver.java:108)
    at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:118)
    at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
    at java.lang.Thread.run(Thread.java:595)




    Can someone give me some ideas on how to get around this.

    fossl33

  • #2
    Re:ERROR-300: Transformer error

    I don't know what is the reason of your problem.

    But you can solve it buy using two destination in your channels: each one a channelWriter for outpound_hl7log_ORM and outpound_hl7log_ADT channels, and by adding a Filter to each destination.

    Comment


    • #3
      Re:ERROR-300: Transformer error

      Hello Albertosaez,

      Thank you for your information, its works fine.
      But now i have a other problem. My inbound channel generates a new
      filename (p.e 1216130459039.dat) witch is written in my database.
      But i want to keep my orginal filename proccesed by my inbound channel because i write this filename in my database. (p.e adt_out_00032977.hl7 )
      Is there a possibility to keep the filename ?

      thanks

      fossl33

      Comment

      Working...
      X