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

Using Outbound Template Tree

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

  • Using Outbound Template Tree

    I'm having trouble with getting a variable out of the 'Outbound message Template Tree' in HL7 format instead of XML.

    Please note that this is the only part of my message that is showing up in XML, the rest is showing up in HL7.

    After I have pasted my sample into the 'message template', I go to the 'message Trees' tab and I can drag the OBR (with the green dot) to my JavaScript step.

    var OBRsegment = tmp['OBR'];

    This gives me the OBR segment in XML, but I need it in HL7 format.

    Code:
    <OBR><OBR.1><OBR.1.1>1</OBR.1.1></OBR.1><OBR.2><OBR.2.1>645</OBR.2.1></OBR.2><OBR.3/><OBR.4><OBR.4.1>MRIMWH</OBR.4.1><OBR.4.2>MRIMWH</OBR.4.2><OBR.4.3/><OBR.4.4>7</OBR.4.4></OBR.4><OBR.5><OBR.5.1>R</OBR.5.1></OBR.5><OBR.6/><OBR.7><OBR.7.1>20030414163056</OBR.7.1></OBR.7><OBR.8/><OBR.9/><OBR.10/><OBR.11/><OBR.12/><OBR.13/><OBR.14/><OBR.15/><OBR.16><OBR.16.1>234</OBR.16.1><OBR.16.2>Refphys</OBR.16.2><OBR.16.3>Wayne</OBR.16.3><OBR.16.4/><OBR.16.5/><OBR.16.6/><OBR.16.7/><OBR.16.8/><OBR.16.9>19</OBR.16.9></OBR.16><OBR.17><OBR.17.1>2305553042</OBR.17.1><OBR.17.2/><OBR.17.3/><OBR.17.4/><OBR.17.5/><OBR.17.6/><OBR.17.7/><OBR.17.8>30492</OBR.17.8></OBR.17><OBR.18><OBR.18.1>MRI</OBR.18.1></OBR.18><OBR.19/><OBR.20/><OBR.21/><OBR.22/><OBR.23/><OBR.24/><OBR.25><OBR.25.1>F</OBR.25.1></OBR.25><OBR.26/><OBR.27><OBR.27.1>1</OBR.27.1><OBR.27.2/><OBR.27.3/><OBR.27.4>20030414163056</OBR.27.4><OBR.27.5/><OBR.27.6>R</OBR.27.6></OBR.27><OBR.28/><OBR.29/><OBR.30/><OBR.31><OBR.31.1/><OBR.31.2>complaint</OBR.31.2></OBR.31><OBR.32><OBR.32.1/><OBR.32.2>Radcleve1&amp;Radcleve1</OBR.32.2><OBR.32.3>465</OBR.32.3></OBR.32><OBR.33/><OBR.34><OBR.34.1/><OBR.34.2/><OBR.34.3>0</OBR.34.3></OBR.34><OBR.35><OBR.35.1/><OBR.35.2>Transcleve1&amp;Transcleve1</OBR.35.2><OBR.35.3>37</OBR.35.3></OBR.35><OBR.36/><OBR.37/><OBR.38/><OBR.39/><OBR.40/><OBR.41/><OBR.42/><OBR.43/><OBR.44><OBR.44.1>A0021</OBR.44.1><OBR.44.2>AMBULANCE SERVICE, OUTSIDE STATE PER MILE, TRANSPORT (MEDICAID ONLY)</OBR.44.2><OBR.44.3/><OBR.44.4/><OBR.44.5>1</OBR.44.5></OBR.44><OBR.45/></OBR>
    I've tried using the 'convert XML to HL7' in the reference tab

    Code:
    var OBRsegment = SerializerFactory.getHL7Serializer(useStrictParser, useStrictValidation, handleRepetitions).fromXML(tmp['OBR']);
    but I get the following error after I add the RTF/XML files to the pickup folder (after deploying the channel, of course):

    Code:
    [2008-08-21 11:30:49,346]  ERROR (org.mule.impl.DefaultComponentExceptionStrategy:95): Caught exception in Exception Strategy for: 3371c2c7-8676-461a-bd75-1ffacd4f3ffa: org.mule.umo.routing.RoutingException: Failed to route event via endpoint: null. Message payload is of type: com.webreach.mirth.model.MessageObject
    org.mule.umo.routing.RoutingException: Failed to route event via endpoint: null. Message payload is of type: com.webreach.mirth.model.MessageObject
     at org.mule.routing.outbound.OutboundMessageRouter.route(OutboundMessageRouter.java:84)
     at org.mule.impl.model.DefaultMuleProxy.onCall(DefaultMuleProxy.java:247)
     at org.mule.impl.model.seda.SedaComponent.doSend(SedaComponent.java:209)
     at org.mule.impl.model.AbstractComponent.sendEvent(AbstractComponent.java:277)
     at org.mule.impl.MuleSession.sendEvent(MuleSession.java:201)
     at org.mule.routing.inbound.InboundMessageRouter.send(InboundMessageRouter.java:161)
     at org.mule.routing.inbound.InboundMessageRouter.route(InboundMessageRouter.java:128)
     at org.mule.providers.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:493)
     at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:272)
     at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:231)
     at com.webreach.mirth.connectors.file.FileMessageReceiver.processFile(FileMessageReceiver.java:236)
     at com.webreach.mirth.connectors.file.FileMessageReceiver.poll(FileMessageReceiver.java:138)
     at org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:118)
     at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290)
     at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
     at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
     at java.lang.Thread.run(Unknown Source)Caused by: org.mule.umo.routing.CouldNotRouteOutboundMessageException: Failed to route event via endpoint: ImmutableMuleEndpoint{[email protected]ea, endpointUri=file://C:/Documents%20and%20Settings/Administrator/Desktop/Mirth/ORU, transformer=Transformer{name='3371c2c7-8676-461a-bd75-1ffacd4f3ffa_destination_1_transformer', returnClass=false, returnClass=false, sourceTypes=[]}, name='_fileEndpoint#-183873191', type='sender', properties={}, [email protected], filter=null, deleteUnacceptedMessages=false, initialised=true, securityFilter=null, synchronous=true, initialState=started, createConnector=0}. Message payload is of type: com.webreach.mirth.model.MessageObject
     at org.mule.routing.outbound.FilteringMulticastingRouter.route(FilteringMulticastingRouter.java:111)
     at org.mule.routing.outbound.OutboundMessageRouter$1.doInTransaction(OutboundMessageRouter.java:78)
     at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:48)
     at org.mule.routing.outbound.OutboundMessageRouter.route(OutboundMessageRouter.java:82)
     ... 16 moreCaused by: org.mule.umo.provider.DispatchException: Failed to route event via endpoint: ImmutableMuleEndpoint{[email protected]ea, endpointUri=file://C:/Documents%20and%20Settings/Administrator/Desktop/Mirth/ORU, transformer=Transformer{name='3371c2c7-8676-461a-bd75-1ffacd4f3ffa_destination_1_transformer', returnClass=false, returnClass=false, sourceTypes=[]}, name='_fileEndpoint#-183873191', type='sender', properties={}, [email protected], filter=null, deleteUnacceptedMessages=false, initialised=true, securityFilter=null, synchronous=true, initialState=started, createConnector=0}. Message payload is of type: com.webreach.mirth.model.MessageObject
     at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:179)
     at org.mule.impl.MuleSession.sendEvent(MuleSession.java:191)
     at org.mule.impl.MuleSession.sendEvent(MuleSession.java:130)
     at org.mule.routing.outbound.AbstractOutboundRouter.send(AbstractOutboundRouter.java:85)
     at org.mule.routing.outbound.FilteringMulticastingRouter.route(FilteringMulticastingRouter.java:89)
     ... 19 moreCaused by: org.mule.umo.transformer.TransformerException: 
    CHANNEL:
     Read_XML_for_ORU
    CONNECTOR:
     Destination 1
    SCRIPT SOURCE:
     
    LINE NUMBER:
     15
    DETAILS:
     ReferenceError: "useStrictParser" is not defined. (com.webreach.mirth.server.MirthJavascriptTransformerException)
     at com.webreach.mirth.server.mule.transformers.JavaScriptTransformer.evaluateScript(JavaScriptTransformer.java:448)
     at com.webreach.mirth.server.mule.transformers.JavaScriptTransformer.transform(JavaScriptTransformer.java:346)
     at org.mule.transformers.AbstractEventAwareTransformer.doTransform(AbstractEventAwareTransformer.java:48)
     at org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:197)
     at org.mule.impl.MuleEvent.getTransformedMessage(MuleEvent.java:251)
     at com.webreach.mirth.server.controllers.MessageObjectController.getMessageObjectFromEvent(MessageObjectController.java:507)
     at com.webreach.mirth.connectors.file.FileMessageDispatcher.doDispatch(FileMessageDispatcher.java:74)
     at com.webreach.mirth.connectors.file.FileMessageDispatcher.doSend(FileMessageDispatcher.java:207)
     at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:166)
     ... 23 moreCaused by: com.webreach.mirth.server.MirthJavascriptTransformerException: 
    CHANNEL:
     Read_XML_for_ORU
    CONNECTOR:
     Destination 1
    SCRIPT SOURCE:
     
    LINE NUMBER: 
     15
    DETAILS:
     ReferenceError: "useStrictParser" is not defined.
     at com.webreach.mirth.server.mule.transformers.JavaScriptTransformer.evaluateScript(JavaScriptTransformer.java:439)
     ... 31 more
    Read_XML_for_ORU-04f6fb4741ef63d22aecb2f7f9cf62b4.xml (90670 bytes)
Working...
X