Announcement

Collapse
No announcement yet.

LLP-Database Problem, hl7_xml is not defined

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

  • LLP-Database Problem, hl7_xml is not defined

    Hi,

    I am trying to setup a Loopback LLP for testing, and I am used channel definition files from one of the support board.

    I have no problem configuring outbound LLP .
    But when I deploy inbound connection from LLP-Database, I get the following error:

    org.mozilla.javascript.EcmaError: ReferenceError: "hl7_xml" is not defined. (4b41974c-5152-43df-ac1e-9917caa681e0#2)
    at org.mozilla.javascript.ScriptRuntime.constructErro r(ScriptRuntime.java:3226)
    at org.mozilla.javascript.ScriptRuntime.constructErro r(ScriptRuntime.java:3216)
    at org.mozilla.javascript.ScriptRuntime.notFoundError (ScriptRuntime.java:3289)
    at org.mozilla.javascript.ScriptRuntime.nameOrFunctio n(ScriptRuntime.java:1633)
    at org.mozilla.javascript.ScriptRuntime.name(ScriptRu ntime.java:1572)
    at org.mozilla.javascript.gen.c30._c2(4b41974c-5152-43df-ac1e-9917caa681e0:2)
    at org.mozilla.javascript.gen.c30.call(4b41974c-5152-43df-ac1e-9917caa681e0)
    at org.mozilla.javascript.optimizer.OptRuntime.callNa me0(OptRuntime.java:106)
    at org.mozilla.javascript.gen.c30._c0(4b41974c-5152-43df-ac1e-9917caa681e0:9)
    at org.mozilla.javascript.gen.c30.call(4b41974c-5152-43df-ac1e-9917caa681e0)
    at org.mozilla.javascript.ContextFactory.doTopCall(Co ntextFactory.java:337)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(Scr iptRuntime.java:2755)
    at org.mozilla.javascript.gen.c30.call(4b41974c-5152-43df-ac1e-9917caa681e0)
    at org.mozilla.javascript.gen.c30.exec(4b41974c-5152-43df-ac1e-9917caa681e0)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateInboundTransformerScript(J avaScriptTransformer.java:253)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.doTransform(JavaScriptTransformer. java:170)
    at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
    at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)
    at org.mule.providers.jdbc.JdbcMessageDispatcher.doDi spatch(JdbcMessageDispatcher.java:80)
    at org.mule.providers.jdbc.JdbcMessageDispatcher.doSe nd(JdbcMessageDispatcher.java:155)
    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:492)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:271)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:243)
    at org.mule.providers.tcp.TcpMessageReceiver$TcpWorke r.processData(TcpMessageReceiver.java:304)
    at org.mule.providers.tcp.TcpMessageReceiver$TcpWorke r.run(TcpMessageReceiver.java:275)
    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)


    My channel definition files are as follows:

    Inbound:

    <com.webreach.mirth.model.Channel>
    <id>7f9f2b48-d67c-4506-8c9e-87bbc1cbd2fe</id>
    <name>Loopback-LLP-DB-Channel</name>
    <description></description>
    <enabled>true</enabled>
    <version>1.3.2</version>
    <revision>3</revision>
    <direction>INBOUND</direction>
    <protocol>HL7</protocol>
    <mode>ROUTER</mode>
    <sourceConnector>
    <name>sourceConnector</name>
    <properties>
    <property name="messageEnd">0x1C</property>
    <property name="ackCodeError">AE</property>
    <property name="messageStart">0x0B</property>
    <property name="ackMsgRejected">Message Rejected.</property>
    <property name="ackCodeRejected">AR</property>
    <property name="receiveTimeout">5000</property>
    <property name="charEncoding">hex</property>
    <property name="bufferSize">65536</property>
    <property name="sendACK">1</property>
    <property name="port">6661</property>
    <property name="ackMsgSuccessful"></property>
    <property name="tcpProtocolClassName">org.mule.providers.tcp .protocols.LlpProtocol</property>
    <property name="segmentEnd">0x0D</property>
    <property name="charsetEncoding">DEFAULT_ENCODING</property>
    <property name="keepSendSocketOpen">0</property>
    <property name="host">127.0.0.1</property>
    <property name="DataType">LLP Listener</property>
    <property name="ackMsgError">An Error Occured Processing Message.</property>
    <property name="ackCodeSuccessful">AA</property>
    <property name="recordSeparator">0x0D</property>
    </properties>
    <transformer>
    <steps/>
    </transformer>
    <filter>
    <rules/>
    </filter>
    <transportName>LLP Listener</transportName>
    </sourceConnector>
    <destinationConnectors>
    <com.webreach.mirth.model.Connector>
    <name>Destination 1</name>
    <properties>
    <property name="URL">jdbcracle:thin:@192.168.200.33:1521:swargdb</property>
    <property name="DataType">Database Writer</property>
    <property name="password">qxplore2001</property>
    <property name="host">query</property>
    <property name="driver">oracle.jdbc.OracleDriver</property>
    <property name="query">INSERT IGNORE INTO mirth_test_output VALUES (${pk}, &apos;${field_1}&apos;, &apos;${field_2}&apos;, &apos;${field_3}&apos</property>
    <property name="username">qxplore</property>
    </properties>
    <transformer>
    <steps>
    <com.webreach.mirth.model.Step>
    <sequenceNumber>0</sequenceNumber>
    <name>New Step</name>
    <script>
    localMap.put(&apos;pk&apos;, hl7_xml[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.1&apos;]);
    </script>
    <type>Mapper</type>
    <data class="map">
    <entry>
    <string>Mapping</string>
    <string>msg[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.1&apos;]</string>
    </entry>
    <entry>
    <string>Variable</string>
    <string>pk</string>
    </entry>
    </data>
    </com.webreach.mirth.model.Step>
    <com.webreach.mirth.model.Step>
    <sequenceNumber>1</sequenceNumber>
    <name>New Step</name>
    <script>
    localMap.put(&apos;field_1&apos;, hl7_xml[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.3&apos;]);
    </script>
    <type>Mapper</type>
    <data class="map">
    <entry>
    <string>Mapping</string>
    <string>msg[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.3&apos;]</string>
    </entry>
    <entry>
    <string>Variable</string>
    <string>field_1</string>
    </entry>
    </data>
    </com.webreach.mirth.model.Step>
    <com.webreach.mirth.model.Step>
    <sequenceNumber>2</sequenceNumber>
    <name>New Step</name>
    <script>
    localMap.put(&apos;field_2&apos;, hl7_xml[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.4&apos;]);
    </script>
    <type>Mapper</type>
    <data class="map">
    <entry>
    <string>Mapping</string>
    <string>msg[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.4&apos;]</string>
    </entry>
    <entry>
    <string>Variable</string>
    <string>field_2</string>
    </entry>
    </data>
    </com.webreach.mirth.model.Step>
    <com.webreach.mirth.model.Step>
    <sequenceNumber>3</sequenceNumber>
    <name>New Step</name>
    <script>
    localMap.put(&apos;field_3&apos;, hl7_xml[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.5&apos;]);
    </script>
    <type>Mapper</type>
    <data class="map">
    <entry>
    <string>Mapping</string>
    <string>msg[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.5&apos;]</string>
    </entry>
    <entry>
    <string>Variable</string>
    <string>field_3</string>
    </entry>
    </data>
    </com.webreach.mirth.model.Step>
    </steps>
    <template>
    MSH|^~\&|AccMgr|1|||20060404090746||ADT^A04|603591 0|D|2.3.1
    EVN|A04|20060404090742
    PID|1|800888^^^AccMgr^PN|999945682^^^AccMgr^MR^1|| TEST^PATIENT MF||19570414|M||W|3^^field_1_3^field_2_3^field_3_3 ^^M|31|||E|M||6635130^^^AccMgr^VN^1|000987655|||2| ||||NOT A VETERAN|||N
    PD1||||1335^ALCOTT^KAREN^^^^^^AccMgr^^^^CI|||I
    NK1|1|TEST^MARGARET|W|21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||Y
    PV1|1|E|ED^^^1|1|||1281^MARKHAM^JOSEPH^^^^^^AccMgr ^^^^CI|1281^MARKHAM^JOSEPH^^^^^^AccMgr^^^^CI||ED|| ||7|S|||62|6635130^^^AccMgr^VN^1|865^SP KOPP|||||||||||||||||||1||A|||20060404090500
    PV2||^NO||||||20060404090500|||||||||||||||||||||| ||||||||S
    DG1|1||^HEADACHE|HEADACHE||A|||||||||0
    GT1|1|382582|TEST^PATIENT MF||21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||19570414|M|||000987655|||| ||||11
    IN1|1|SELF PAY NYS|734|SELF PAY NYS|||||||||||5|TEST^PATIENT MF|1|19570414|21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||||||||||||||||||||||11|M|| ||||382582
    IN1|2|SELF PAY|705|SELFPAY|||||||||||5||1
    IN2|1||000987655
    </template>
    </transformer>
    <filter>
    <rules/>
    </filter>
    <transportName>Database Writer</transportName>
    </com.webreach.mirth.model.Connector>
    </destinationConnectors>
    <properties>
    <property name="initialState">stopped</property>
    <property name="synchronous">true</property>
    <property name="store_messages">true</property>
    <property name="recv_xml_encoded">false</property>
    <property name="encryptData">false</property>
    <property name="transactional">false</property>
    <property name="max_message_age">-1</property>
    <property name="error_messages_only">false</property>
    </properties>
    <preprocessingScript>// Modify the message variable below to pre process data

    return message;</preprocessingScript>
    </com.webreach.mirth.model.Channel>


    Outbound:


    <com.webreach.mirth.model.Channel>
    <id>28dc4c59-4e96-407f-8c23-63a2551c7f36</id>
    <name>Loopback-DB-LLP-Sender</name>
    <description></description>
    <enabled>true</enabled>
    <version>1.3.2</version>
    <revision>11</revision>
    <direction>OUTBOUND</direction>
    <protocol>HL7</protocol>
    <mode>ROUTER</mode>
    <sourceConnector>
    <name>sourceConnector</name>
    <properties>
    <property name="pollingFrequency">5000</property>
    <property name="username">qxplore</property>
    <property name="DataType">Database Reader</property>
    <property name="useAck">1</property>
    <property name="URL">jdbcracle:thin:@192.168.200.33:1521:swargdb</property>
    <property name="query">SELECT cmadtid as pk, MRN as field_1, pat_fname as field_2, Gender as field_3 FROM cmadt_hl7 WHERE been_read = 0</property>
    <property name="password">qxplore2001</property>
    <property name="host">query</property>
    <property name="driver">oracle.jdbc.OracleDriver</property>
    <property name="ack">UPDATE cmadt_hl7 SET been_read = 1 WHERE cmadtid = ${pk}</property>
    </properties>
    <transformer>
    <steps/>
    </transformer>
    <filter>
    <rules/>
    </filter>
    <transportName>Database Reader</transportName>
    </sourceConnector>
    <destinationConnectors>
    <com.webreach.mirth.model.Connector>
    <name>Destination 2</name>
    <properties>
    <property name="tcpProtocolClassName">org.mule.providers.tcp .protocols.LlpProtocol</property>
    <property name="segmentEnd">0x0D</property>
    <property name="messageEnd">0x1C</property>
    <property name="keepSendSocketOpen">0</property>
    <property name="bufferSize">65536</property>
    <property name="port">6661</property>
    <property name="sendTimeout">5000</property>
    <property name="messageStart">0x0B</property>
    <property name="maxRetryCount">50</property>
    <property name="charEncoding">hex</property>
    <property name="DataType">LLP Sender</property>
    <property name="recordSeparator">0x0D</property>
    <property name="usePersistentQueues">1</property>
    <property name="ackTimeout">5000</property>
    <property name="charsetEncoding">DEFAULT_ENCODING</property>
    <property name="host">127.0.0.1</property>
    </properties>
    <transformer>
    <steps>
    <com.webreach.mirth.model.Step>
    <sequenceNumber>0</sequenceNumber>
    <name>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.1&apos;]</name>
    <script>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.1&apos;] = validate(msg[&apos;pk&apos;]);</script>
    <type>HL7 Message Builder</type>
    <data class="map">
    <entry>
    <string>Mapping</string>
    <string>msg[&apos;pk&apos;]</string>
    </entry>
    <entry>
    <string>Variable</string>
    <string>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.1&apos;]</string>
    </entry>
    </data>
    </com.webreach.mirth.model.Step>
    <com.webreach.mirth.model.Step>
    <sequenceNumber>1</sequenceNumber>
    <name>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.3&apos;]</name>
    <script>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.3&apos;] = validate(msg[&apos;field_1&apos;]);</script>
    <type>HL7 Message Builder</type>
    <data class="map">
    <entry>
    <string>Mapping</string>
    <string>msg[&apos;field_1&apos;]</string>
    </entry>
    <entry>
    <string>Variable</string>
    <string>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.3&apos;]</string>
    </entry>
    </data>
    </com.webreach.mirth.model.Step>
    <com.webreach.mirth.model.Step>
    <sequenceNumber>2</sequenceNumber>
    <name>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.4&apos;]</name>
    <script>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.4&apos;] = validate(msg[&apos;field_2&apos;]);</script>
    <type>HL7 Message Builder</type>
    <data class="map">
    <entry>
    <string>Mapping</string>
    <string>msg[&apos;field_2&apos;]</string>
    </entry>
    <entry>
    <string>Variable</string>
    <string>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.4&apos;]</string>
    </entry>
    </data>
    </com.webreach.mirth.model.Step>
    <com.webreach.mirth.model.Step>
    <sequenceNumber>3</sequenceNumber>
    <name>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.5&apos;]</name>
    <script>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.5&apos;] = validate(msg[&apos;field_3&apos;]);</script>
    <type>HL7 Message Builder</type>
    <data class="map">
    <entry>
    <string>Mapping</string>
    <string>msg[&apos;field_3&apos;]</string>
    </entry>
    <entry>
    <string>Variable</string>
    <string>tmp[&apos;PID&apos;][&apos;PID.11&apos;][&apos;XAD.5&apos;]</string>
    </entry>
    </data>
    </com.webreach.mirth.model.Step>
    </steps>
    <template>MSH|^~\&|AccMgr|1|||20060404090746||ADT^ A04|6035910|D|2.3.1
    EVN|A04|20060404090742
    PID|1|800888^^^AccMgr^PN|999945682^^^AccMgr^MR^1|| TEST^PATIENT MF||19570414|M||W|21 PALM MANOR^^EAST SYRACUSE^NY^130570000^^M|31|||E|M||6635130^^^AccMg r^VN^1|000987655|||2|||||NOT A VETERAN|||N
    PD1||||1335^ALCOTT^KAREN^^^^^^AccMgr^^^^CI|||I
    NK1|1|TEST^MARGARET|W|21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||Y
    PV1|1|E|ED^^^1|1|||1281^MARKHAM^JOSEPH^^^^^^AccMgr ^^^^CI|1281^MARKHAM^JOSEPH^^^^^^AccMgr^^^^CI||ED|| ||7|S|||62|6635130^^^AccMgr^VN^1|865^SP KOPP|||||||||||||||||||1||A|||20060404090500
    PV2||^NO||||||20060404090500|||||||||||||||||||||| ||||||||S
    DG1|1||^HEADACHE|HEADACHE||A|||||||||0
    GT1|1|382582|TEST^PATIENT MF||21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||19570414|M|||000987655|||| ||||11
    IN1|1|SELF PAY NYS|734|SELF PAY NYS|||||||||||5|TEST^PATIENT MF|1|19570414|21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||||||||||||||||||||||11|M|| ||||382582
    IN1|2|SELF PAY|705|SELFPAY|||||||||||5||1
    IN2|1||000987655
    </template>
    </transformer>
    <filter>
    <rules/>
    <template>
    MSH|^~\&|AccMgr|1|||20060404090746||ADT^A04|603591 0|D|2.3.1
    EVN|A04|20060404090742
    PID|1|800888^^^AccMgr^PN|999945682^^^AccMgr^MR^1|| TEST^PATIENT MF||19570414|M||W|21 PALM MANOR^^EAST SYRACUSE^NY^130570000^^M|31|||E|M||6635130^^^AccMg r^VN^1|000987655|||2|||||NOT A VETERAN|||N
    PD1||||1335^ALCOTT^KAREN^^^^^^AccMgr^^^^CI|||I
    NK1|1|TEST^MARGARET|W|21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||Y
    PV1|1|E|ED^^^1|1|||1281^MARKHAM^JOSEPH^^^^^^AccMgr ^^^^CI|1281^MARKHAM^JOSEPH^^^^^^AccMgr^^^^CI||ED|| ||7|S|||62|6635130^^^AccMgr^VN^1|865^SP KOPP|||||||||||||||||||1||A|||20060404090500
    PV2||^NO||||||20060404090500|||||||||||||||||||||| ||||||||S
    DG1|1||^HEADACHE|HEADACHE||A|||||||||0
    GT1|1|382582|TEST^PATIENT MF||21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||19570414|M|||000987655|||| ||||11
    IN1|1|SELF PAY NYS|734|SELF PAY NYS|||||||||||5|TEST^PATIENT MF|1|19570414|21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||||||||||||||||||||||11|M|| ||||382582
    IN1|2|SELF PAY|705|SELFPAY|||||||||||5||1
    IN2|1||000987655
    </template>
    </filter>
    <transportName>LLP Sender</transportName>
    </com.webreach.mirth.model.Connector>
    </destinationConnectors>
    <properties>
    <property name="initialState">stopped</property>
    <property name="synchronous">true</property>
    <property name="store_messages">true</property>
    <property name="recv_xml_encoded">false</property>
    <property name="encryptData">false</property>
    <property name="transactional">false</property>
    <property name="max_message_age">-1</property>
    <property name="error_messages_only">false</property>
    </properties>
    <preprocessingScript>// Modify the message variable below to pre process data

    return message;</preprocessingScript>
    </com.webreach.mirth.model.Channel>



    Thanks,

    Ratnakar


  • #2
    Re: LLP-Database Problem, hl7_xml is not defined

    This is a known issue related to the migration of old channels XML files.

    You need to change "hl7_xml" to "msg" or "tmp" if the channel is an OUTBOUNT or INBOUND

    Comment


    • #3
      Re: LLP-Database Problem, hl7_xml is not defined

      Thank you. But where can I get more info as to how to go about setting/editing transformers?

      Comment

      Working...
      X