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

calling stored procedures on the Source connector

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

  • calling stored procedures on the Source connector

    Version : Mirth 1.5

    using javascript stored procedure in source connector.

    var dbConn = DatabaseConnectionFactory.createDatabaseConnection ('sun.jdbc.odbc.JdbcOdbcDriver','DATABASE','USERNA ME','');

    //HERE I AM GETTING ROWS MORE THAN ONE ROW
    var result = dbConn.executeCachedQuery("select patienttestno,t_observation from pob_observation where c_flag='F'");

    // HERE THE ROWS ARE TRAVERSED ,BLOB DATA CONVERTED TO TEXT DATA
    while (result.next())
    {
    var xray = result.getClob(2);
    var strOut = new java.lang.StringBuffer();
    var aux = new java.lang.String();
    var kit = new Packages.javax.swing.text.rtf.RTFEditorKit()
    var doc = new Packages.javax.swing.text.DefaultStyledDocument();
    kit.read(xray.getAsciiStream(), doc, 0);

    var text=doc.getText(0,doc.getLength());
    channelMap.put('xray',text);
    }

    dbConn.close();
    return result;

    select query returns more than one rows.How can i traverse in each row and map to the HL7 OBX5.1 Message?

  • #2
    Re:calling stored procedures on the Source connector

    Sorry, I don't see where you are calling a stored procedure here?
    Chris Lang

    Comment


    • #3
      Re:calling stored procedures on the Source connector

      Dear Chrisl,

      Instead of stored procedure i have used select statement [select patienttestno,t_observation from pob_observation where c_flag='F']
      which returns patienttestno and t_observation (which is clob data). I need to convert clob data to text format.

      Comment


      • #4
        using javascript stored procedure in source connec

        Finally able to get the hl7 message OBX.5.1 rtf into text data.:laugh:.I am attaching the file herewith.I am using Database to File Writer.

        If i need to configure the same for LLP channel,How can i handle ACK messages and Error Messages?

        Testsample.xml (8677 bytes)

        Comment


        • #5
          Re:using javascript stored procedure in source connec

          Can you post this channel to the file repository? Thanks!
          Chris Lang

          Comment

          Working...
          X