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

Variable scopes

  • Filter
  • Time
  • Show
Clear All
new posts

  • Variable scopes

    I know this is a little on the old side, but I have a 1.3.2 installation that I'm upgrading to 1.7. Several channels use localmap.put() in JavaScript transformers, which isn't available in 1.7. (Replaced with ConnectorMap.put(), if I'm reading correctly?)

    Did some digging - the closest I found to a good description of the new variable scoping was MIRTH-274 in JIRA. Does a better description exist somewhere?

    Thanks, Mike

  • #2
    Re:Variable scopes

    Follow-up and additional question:

    In some brief testing, connectorMap.put() seems to do the same thing as the old localmap.put(), but I'm scratching my head on a related issue:

    I have a JS transformer step that identifies critical lab results and sets a variable if any are found:

    var hiloflag;
    var rval;

    rval = "";

    for each (obx in msg..OBX) {

    hiloflag = obx['OBX.8'];

    if (hiloflag != null) {
    if (hiloflag.toString().equals('CH')) {
    rval = "C";

    if (hiloflag.toString().equals('CL')) {
    rval = "C";


    connectorMap.put('criticalflag',rval); in 1.3.2

    In testing with an Email Sender destination, I have the body as:

    New critical results available
    PID: ${PID}
    Accession: ${Accession}
    Critical flag: ${criticalflag}
    PID and Accession use similar connectorMap.put() calls, and they work, but the criticalflag variable is always null.

    What am I missing?

    Tnx, Mike

    Post edited by: mnowlin, at: 01/30/2008 00:22