Announcement

Collapse
No announcement yet.

Share database conn. info. across different destinations?

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

  • Share database conn. info. across different destinations?

    Referred "queryDatabase Filter" example at

    http://www.mirthproject.org/index.ph...filter_example

    which uses:

    var driver = "net.sourceforge.jtds.jdbc.Driver";
    var address = "jdbc:jtds:sqlserver://srv.test.com:1433/DevMirth;";
    var username = "mirth";
    var password = "mirth";

    ...

    Question: How to share the database connection settings across different database destinations on a single channel?

    For e.g., Channel called "MirthHL7Test" has

    the filter above for two database destinations called

    DestForA04 --> uses above filter and inserts new patient record to Patient table.

    DestForA08 --> uses similar filter and does an update of patient record on Patient table.

    Would like to have the driver, address, username, and password defined in one place to be used across all destinations.

    Tried playing around with the global variable but couldn't get it to work. An example would help a lot!

    Thanks in advance!

  • #2
    Re: Share database conn. info. across different destinations?

    globalMap.put('driver', "net.sourceforge.jtds.jdbc.Driver");

    When you want to access it:

    globalMap.get('driver'


    We have made significant changes to the globalMap in 1.2, however the same syntax should apply.

    -Chris
    Chris Lang

    Comment

    Working...
    X