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

Clear values from outgoing message template

  • Filter
  • Time
  • Show
Clear All
new posts

  • Clear values from outgoing message template

    This is probably easy, but I am not figuring it out.
    I am going from HL7 to XML.
    Source is going straight through to Destination
    Message templates at Destination Transformer for both HL7 (in) and XML (out).
    If there is a mapping for a given XML segment, then everything works fine.
    If there is NOT a mapping (might be in the future, but it isn't mapped at this point) then the default value from the XML message template is inserted into the final out.
    Is there a way to delete those values from the template before filling it in (in essence, clear the template, then do the mapping magic) or get Mirth to ignore non-mapped XML segments?
    I tried deleting a whole section as a Javascript first step:

    delete tmp['PatientRecord']['Patient'];

    but that just deletes the whole section which isn't rebuilt by the mapping and cannot then be filled in.

    In essence, I'd like a filled in XML template to use for mapping, but an empty template when I run it, and the ability to eliminate any empty values in the template.


  • #2
    Re:Clear values from outgoing message template

    I have come up with one solution on my own, although I am open to other programmatic ideas.
    If I just put create a mapping in the transformer for each of the fields in the XML template putting them a message segment, leaving the mapping portion blank for those I don't want to map, I get blank segments.
    I will still need to clear the empties, but better than sending bad information.