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

HL7 to HL7 Channel

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

  • HL7 to HL7 Channel

    Does anyone have an HL7 to HL7 channel that I can look at as an example?
    Reid Hospital and Healthcare

  • #2
    Re:HL7 to HL7 Channel

    What exactly are you trying to do? Change HL7 records? Change HL7 versions (from 2.4 to 3.0 or something)?

    Or just move an HL7 file from point A to point B?

    Comment


    • #3
      Re:HL7 to HL7 Channel

      You can find sample channels on the Documentation Page

      http://www.mirthproject.org/index.ph...d=19&Itemid=43

      Comment


      • #4
        Re:HL7 to HL7 Channel

        huubvandemortel wrote:
        You can find sample channels on the Documentation Page

        http://www.mirthproject.org/index.ph...d=19&Itemid=43
        I was looking through the Channels and I must have missed what the description was. Thanks for the link.

        Also, I was looking at the example. For the transformer, there is a javascript step. How do I add that step? When I click on "Add New Step", I can only get a mapper step.

        Thanks in advance!
        Reid Hospital and Healthcare

        Comment


        • #5
          Re:HL7 to HL7 Channel

          Also, if i could get some help with some javascript. I want to return an ACK/NAK based on the outcome of this insert statement.

          I'm getting this error:
          ERROR-406: JDBC Connector error
          ERROR MESSAGE: Database script not found in cache


          Here is my code:
          Code:
          var dbConn = DatabaseConnectionFactory.createDatabaseConnection('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:«»sqlserver://10.194.22.245:1433/Test;','jsp','jsp');
          
          var sql = "insert into megacare_test (firstname) values ('"  $(sFirstName)  "')";
          
          var result = dbConn.executeUpdate(sql);
          
          dbConn.close();
          
          return True;
          Post edited by: afterdark23, at: 10/10/2007 10:47
          Reid Hospital and Healthcare

          Comment


          • #6
            Re:HL7 to HL7 Channel

            Do you have Javascript selected?
            Chris Lang

            Comment


            • #7
              Re:HL7 to HL7 Channel

              yes
              Reid Hospital and Healthcare

              Comment


              • #8
                Re:HL7 to HL7 Channel

                I've done some testing to see if i can get a value in the database.

                This code works:
                Code:
                var dbConn = DatabaseConnectionFactory.createDatabaseConnection('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:«»sqlserver://10.194.25.27:1433/OpenLink;','asp','asp');
                var sql = "insert into megacare_test (firstname) values ('TestWrite')";
                var result = dbConn.executeUpdate(sql);
                dbConn.close();
                This code does not work:
                Code:
                var dbConn = DatabaseConnectionFactory.createDatabaseConnection('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:«»sqlserver://10.194.25.27:1433/OpenLink;','asp','asp');
                var sql = "insert into megacare_test (firstname) values ('" + $(sFirstName) + "')";
                var result = dbConn.executeUpdate(sql);
                
                dbConn.close();
                Under the Transformer I have
                Variable: sFirstName
                Add to: Connector Map
                Mapping: msg['PID']['PID.5']['PID.5.2'].toString()


                I have looked at other sql code posted and the syntax looks to be correct.

                Here is the error i am getting:
                Code:
                ERROR-406: JDBC Connector error
                ERROR MESSAGE:	Error writing to database: 
                org.mozilla.javascript.EcmaError: ReferenceError: "sFirstName" is not defined. (d27aa1ff-bef8-4bef-a04b-aff7b047450c#5)
                	at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3226)
                	at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3216)
                	at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3289)
                	at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1567)
                	at org.mozilla.javascript.gen.c88._c6(d27aa1ff-bef8-4bef-a04b-aff7b047450c:5)
                	at org.mozilla.javascript.gen.c88.call(d27aa1ff-bef8-4bef-a04b-aff7b047450c)
                	at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:106)
                	at org.mozilla.javascript.gen.c88._c0(d27aa1ff-bef8-4bef-a04b-aff7b047450c:12)
                	at org.mozilla.javascript.gen.c88.call(d27aa1ff-bef8-4bef-a04b-aff7b047450c)
                	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:337)
                	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2755)
                	at org.mozilla.javascript.gen.c88.call(d27aa1ff-bef8-4bef-a04b-aff7b047450c)
                	at org.mozilla.javascript.gen.c88.exec(d27aa1ff-bef8-4bef-a04b-aff7b047450c)
                	at com.webreach.mirth.connectors.jdbc.JdbcMessageDispatcher.doDispatch(JdbcMessageDispatcher.java:97)
                	at com.webreach.mirth.connectors.jdbc.JdbcMessageDispatcher.doSend(JdbcMessageDispatcher.java:157)
                	at org.mule.providers.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:166)
                	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)
                	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)
                	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:492)
                	at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:271)
                	at org.mule.providers.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:230)
                	at com.webreach.mirth.connectors.vm.VMMessageReceiver.getMessages(VMMessageReceiver.java:141)
                	at org.mule.providers.TransactedPollingMessageReceiver.poll(TransactedPollingMessageReceiver.java:108)
                	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)

                Thanks for any and all help!

                Post edited by: afterdark23, at: 10/11/2007 07:06
                Reid Hospital and Healthcare

                Comment


                • #9
                  Re:HL7 to HL7 Channel

                  nobody???
                  Reid Hospital and Healthcare

                  Comment


                  • #10
                    Re:HL7 to HL7 Channel

                    try single quotes inside the ( )not double...

                    Comment


                    • #11
                      Re:HL7 to HL7 Channel

                      There is a bug when you pull variable onto the script that does not put single quotes around the variable name. Try $('sFirstName').

                      Comment


                      • #12
                        Re:HL7 to HL7 Channel

                        There is a bug when you pull variable onto the script that does not put single quotes around the variable name. Try $('sFirstName').

                        Comment


                        • #13
                          Re:HL7 to HL7 Channel

                          works! thanks for the help!
                          Reid Hospital and Healthcare

                          Comment

                          Working...
                          X