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

Changing HL7 Messages

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

  • Changing HL7 Messages

    Hello I tried for 2 days to solve this problem. I don't get it.

    I have a LLP Listener and a FileWriter.

    I want to change the & symbol to HTMLCode-amp inside of the incoming HL7 Message and write this modified Message to the file.

    That works fine, but I am not able to write it to file. The transformer does not write the modified message to the encodedMessage.

    My script is

    Code:
    var m = messageObject.getRawData();
    
    logger.info("old: "+m);
    
    
    var m2 = m.replace("&", "HTMLCode-amp");
    
    
    logger.info("new: "+m2);
    
    responseMap.put('Destination 1',m2);
    How can I write the modified HL7 Message as String to the filewriter output?

    Post edited by: dajos7, at: 12/14/2007 02:32

  • #2
    Re:Changing HL7 Messages

    Create a global variable with the content of the message changed, and drop it into the template's output box

    Code:
    var m = messageObject.getRawData();
    logger.info("old: "+m);
    var m2 = m.replace("&", "HTMLCode-amp"«»);
    logger.info("new: "+m2);
    channelMap.put('mok',m2);

    Comment

    Working...
    X