Friday, September 30, 2022
Home Integration/Interfaces How to Export Your Mirth Connect Instance (or part of it)

How to Export Your Mirth Connect Instance (or part of it)

Mirth allows you to export your build into one or more XML files. Most often, you will want to export your entire build into a single XML file. This is the most efficient way, for example, to create a Production environment from a Test environment or vice versa.

You could simply export your build from one environment, import it to the target environment, make any necessary configurations that are specific to that environment, and then save your changes.

The first thing you must do is determine what you want to export within Mirth Connect. Here are your options.

  • Entire Build (Config)
  • Channels
  • Groups
  • Global Scripts
  • Libraries (Code Templates)
  • Results (Messages)
  • Configuration Maps
  • Events
  • Alerts

Next, open Mirth Connect Administrator Launcher and click Launch on your desired environment.

Login to Mirth Connect Administrator.

After logging into Mirth, navigate to the section that you want to export. For example, if you need to export one or more channels then select Channels on the left-hand side. If you need to export the entire Mirth instance then select Settings.

Entire Build

Exporting the entire Mirth instance is straightforward once you know where to go. Initially, navigate to Settings by selecting the label on the left-hand side.

Under Server Tasks on the left-hand side select Backup Config.

Immediately, you should see the file browser window pop up.

Browse to the destination directory and click Save. Note that Mirth will automatically name the file with the format ‘YYYY-MM-DD Mirth Backup.xml’; however, you can change the name to whatever you want.

You should receive a pop-up notification once the file has been written successfully. Click ‘OK’ to finish.

Channels

Using the Export Channel option is best for when you want to save off individual channels. To export a channel, start by clicking Channels on the left-hand side.

Afterwards, select the the channel that you want to export.

Under Channel Tasks, click Export Channel on the left-hand side.

Immediately, you should see the file browser window pop up.

Browse to the destination directory and click Save. Note that Mirth will automatically use your channel name as the file name; however, you can change the name to whatever you want. It’s common to append the file name with the date and/or time that the export occurred. That way, when someone else comes along, they know how current the channel is.

You should receive a pop-up notification once the file has been written successfully. Click ‘OK’ to finish.

Groups

Using the Export Group option is best if you want to export multiple channels that are related. Your channels should be set up such that related channels all appear under the same group.

Additionally, using the Export All Groups option is best if you want to export all channels in your build. This includes all the channels that reside in the Default Group as well.

Regardless of which option you need, you can start by selecting Channels on the left-hand side.

Export Group

Select the the group that you want to export.

Under Group Tasks, click Export Group on the left-hand side.

Immediately, you should see the file browser window pop up.

Browse to the destination directory and click Save. Note that Mirth will automatically use your group name as the file name; however, you can change the name to whatever you want. It’s common to append the file name with the date and/or time that the export occurred. That way, when someone else comes along, they know how current the group is.

You should receive a pop-up notification once the file has been written successfully. Click ‘OK’ to finish.

Export All Groups

Under Group Tasks, click Export All Groups on the left-hand side.

Immediately, you should see the file browser window pop up.

Browse to the destination directory and click Save. Note that there is no automatic naming convention when exporting all groups so you will have to come up with your own name.

You should receive a pop-up notification once the file has been written successfully. Click ‘OK’ to finish.

Libraries

Using the Export Library option is best if you want to export a single library of code. Note that one library is made up of one or more code templates.

Additionally, using the Export All Libraries option is best if you want to export all libraries in your instance. This option would capture all code templates in your build.

Regardless of which option you need, you can start by selecting Channels on the left-hand side.

Afterwards, select Edit Code Templates on the left-hand side.

Export Library

Select the Library that you want to export.

Under Code Template Tasks, click Export Library on the left-hand side.

Immediately, you should see the file browser window pop up.

Browse to the destination directory and click Save. Note that Mirth will automatically use your library name as the file name; however, you can change the name to whatever you want. It’s common to append the file name with the date and/or time that the export occurred. That way, when someone else comes along, they know how current the library is.

You should receive a pop-up notification once the file has been written successfully. Click ‘OK’ to finish.

Export Code Template

Select the Code Template that you want.

Under Code Template Tasks, click Export Code Template on the left-hand side.

Immediately, you should see the file browser window pop up.

Browse to the destination directory and click Save. Note that Mirth will automatically use your template name as the file name; however, you can change the name to whatever you want. It’s common to append the file name with the date and/or time that the export occurred. That way, when someone else comes along, they know how current the template is.

You should receive a pop-up notification once the file has been written successfully. Click ‘OK’ to finish.

Export All Libraries

Under Code Template Tasks, click Export All Libraries on the left-hand side.

Immediately, you should see the file browser window pop up.

Browse to the destination directory and click Save. Note that there is no automatic naming convention when exporting all libraries so you will have to come up with your own name.

You should receive a pop-up notification once the file has been written successfully. Click ‘OK’ to finish.

Results

From the Dashboard, double-click on the channel that you want to export results for.

Before proceeding further, go ahead and perform your search if you only want to export a certain subset of messages. Export Results will only contain the messages returned in your search.

Under Message Tasks, click Export Results on the left-hand side.

Afterwards you should see the following dialog pop up.

First, choose the content that you would like to export. Your options include the following:

  • XML serialized message
  • Source – Raw
  • Source – Processed Raw
  • Source – Transformed
  • Source – Encoded
  • Source – Response
  • Destination – Raw
  • Destination – Transformed
  • Destination – Encoded
  • Destination – Sent
  • Destination – Response
  • Destination – Processed Response
  • Source Map
  • Channel Map
  • Response Map

Next, choose your options for encryption, attachments, and compression. Then you can specify an export directory as well as a file pattern. Note that you can drag and drop the variables on the right-hand side into your file pattern.

Click Export.

Configuration Maps

Select Settings on the left-hand side.

Select the Configuration Map tab.

Under Configuration Map Tasks, click Export Map on the left-hand side.

Immediately, you should see the file browser window pop up.

Browse to the destination directory and click Save. Note that there is no automatic naming convention when exporting the configuration map so you will have to come up with your own name. Another difference is that the configuration map is exported using a properties file while the others have used an XML file.

You should receive a pop-up notification once the file has been written successfully. Click ‘OK’ to finish.

Events

Select Settings on the left-hand side.

Select the Data Pruner tab.

Under Data Pruner Tasks, select View Events.

Under Event Tasks, select Export All Events.

Mirth will ask you to confirm that you want to export all events.

After clicking yes, you should see something similar to the following.

Notice that the export goes to the appdata directory within your Mirth Connect installation folder. Additionally, the file type is txt.

Alerts

Select Alerts on the left-hand side.

Under Alert Tasks select Export All Alerts.

Immediately, you should see the file browser window pop up.

Browse to the destination directory and click Save. Note that there is no automatic naming convention when exporting all alerts so you will have to come up with your own name.

You should receive a pop-up notification once the file has been written successfully. Click ‘OK’ to finish.

RELATED ARTICLES

Why You Must Learn Mirth Connect’s User API Now

Prerequisites Basic knowledge of Mirth ConnectBasic knowledge of JavaScriptBasic knowledge of software documentation and APIsBasic knowledge of Java development NextGen provides several different APIs (Application Programming...

Leverage Mirth’s Channel Scripts Now

Prerequisites Basic knowledge of Mirth ConnectBasic knowledge of JavaScript Each Mirth Connect channel gives you the ability to leverage four different scripts that have different triggers,...

Reference a Custom Jar File in Mirth Connect Now

Prerequisites Knowledge of Java developmentKnowledge of Eclipse or another Java IDEKnowledge of Mirth Connect Many Mirth professionals are unaware that they can write their own custom...

Most Popular

Mirth Connect Extensions: What You Need to Know

Prerequisistes Basic Knowledge of Mirth Connect Overview Users can navigate to Mirth Connect's Extensions screen by selecting Extensions on the left-hand side. You should now see the following...

Take a Tour of System Settings in Mirth Connect Now

Prerequisites Basic Knowledge of Mirth Connect Introduction Mirth Connect has a multitude of system settings that are available for configuration. In larger companies, there will often be...

Why You Must Master Mirth’s Message Template Tool Today

Prerequisuites Basic Knowledge of Mirth ConnectKnowledge of Programming in Mirth Connect Introduction When writing scripts in Mirth Connect, you have a message template tool that allows you...

Make Sense of HL7 v2 Messages Effortlessly Now

Prerequisites Beginner Knowledge of HL7 Introduction If you've been in Healthcare Information Technology for any period of time, you have definitely heard of HL7 (Health Level 7)....

Recent Comments