Mirth Connect – Tips and Tricks

mirth partner 1

Two weeks ago, I introduced the Mirth Connect interface engine and shared its impact on one of my client engagements at Galen Healthcare Solutions. Through that experience I was constantly learning new ways to make Mirth safer, faster, and easier to use. After almost six months of development work, I wanted to share some tips on how you can optimize Mirth Connect.

  • Add channel metadata to troubleshoot faster: You may already be storing useful information about incoming messages in channel variables, such as the MRN of a patient, an identifier for a hospital, or the HTTP response code of a message you are POSTing via Mirth™. By adding these channel variables to the metadata of a channel, you can view the values for these variables on the message log screen and also speed up your searches when using the Advanced search filter and specifying the metadata you have defined.

    In the message log screen for your channel you can see your new metadata, adding important information to your message log. Use the Advanced search option with metadata specified to experience faster search results.
    In the message log screen for your channel you can see your new metadata, adding important information to your message log. Use the Advanced search option with metadata specified to experience faster search results.

  • Don’t catch errors gracefully: You don’t often hear this, but in your Mirth™ JavaScript code, you may not want to catch errors gracefully. If you wrap your code in try/catch blocks but do not throw the error, Mirth™ will let the message continue processing and anything could happen with a broken message downstream. Throw your errors to let the message fail.

    Wrap your JavaScript code in try/catch blocks to capture errors and make sure to throw the error so that the message gets set to ERROR and does not continue being processed.
    Wrap your JavaScript code in try/catch blocks to capture errors and make sure to throw the error so that the message gets set to ERROR and does not continue being processed.

  • View the rest of my tips and tricks on Galen Healthcare Solution’s blog