How to Install Mirth Connect in Docker

Originally published at: How to Install Mirth Connect in Docker - Open Integrator

In this guide, I will show you how you can install Mirth Connect in a docker container. Mirth Connect is an integration engine from NextGen Healthcare. You can choose to use this open-source version for free or also choose to get the software with commercial support from NextGen. This guide is about installing the open-source…

This is the video

I also made a video on installing Mirth connect on windows which might be helpfull

Hello! Thank you for creating this channel and community, your videos are great and very helpful.

I was wondering if you might be able to post instructions (maybe in video format??) where you add a very simple non-dicom image to your orthanc server using Mirth.

The flow would be; Non-DICOM file (jpg, pdf etc.) → Mirth Connect → Orthanc → OHIF.

A simple example that your subscribers could build on would be extremely helpful.

Thank you!

AJ

1 Like

Hi AJ! Thank you so much for the kind words — I really appreciate the support and feedback! :blush: I’m glad the videos have been helpful.

Your request is a great one. Converting non-DICOM content (like JPGs or PDFs) and pushing it to Orthanc via Mirth Connect, so that it shows up in OHIF, is a cool use case to look at.

Most likely in Mirth Connect we will need use javascript to call an external Java library like dcm4che.

Perhaps we could have an incoming hl7 message which includes patientid etc. metadata and it points to a pdf or jpg on a network disk and then we use Mirth to read the file from disk and wrap it in dicom and send it to Orthanc.

I think it should all be doable. Will get back to this once I have put something together :slightly_smiling_face:

1 Like

Here is an example of using java code in a Mirth channel. It doesn’t quite take it end to end yet but rather shows the “hard” part of converting pdf to dicom. Will let you know once I have the full flow done where it actually sends the DICOM to a DICOM archive.

Hi @AllyJ ,

I have created an implementation in Mirth which wraps pdf to dicom and sends it over to a DICOM destination. You can find the instructions and the full video in the post below.

Was this what you were looking for?

Hi John,

Thank you for the time spent reviewing this use-case. I appreciate it a lot and it was exactly what I was looking for as a foundation for using MC for the basic task of packaging PDFs as DCMs.

One issue I ran in to was the transformer for the wrapPdf2DCM channel was concatenating the file paths using a Windows-style backslash (dir + ‘\’ + fileNamePDF) which meant that it couldn’t read or write files in a Linux enviroment (like if the Mirth Server was running on Docker).

I created a new Channel that allows for multi-OS environments and am including the .xml here for you to update on your GH. This granted me the ability to use a Volume on Docker as the Source and Destination. I haven’t tested it on a Windows-based Mirth yet.

e7491e89-a1ed-4f71-8429-51afc02018a4 3 wrapPdf2DCM wrapPdf2DCM version 1.0.0 What the channel does: - the input folder needs to a have a pdf file and a .txt file with the same name. The txt file has <patientId;<patientName> - the channel reads the txt file and then finds the .pdf file from the same folder, wraps it to DICOM with the metadata from the .txt file and writes .dcm file to the folder next to the pdf - the .txt file gets moved to the the processed folder Configuration guidance: source: - by default reads from C:\mirth\wrapPdf2DCM\input and moves processed txt files to C:\mirth\wrapPdf2DCM\processed -- change the folders if needed 4 0 sourceConnector INTERVAL false 5000 0 0 true false false false false false false false false 1 true 8 0 17 0 None true false false 1 Default Resource [Default Resource] 1000 FILE /mirthshare/input *.txt false false true true anonymous anonymous 10000 true true true MOVE /mirthshare/processed ${originalFilename} NONE AFTER_PROCESSING true 1000 0 true date false DEFAULT_ENCODING code 0 true DELIMITED DELIMITED ; \n " true \ false true , \n " true \ Record 0 false , \n " true \ false true ; \n " true \ Record 0 false File Reader SOURCE true true 1 DICOM transform and write to file false false 10000 false 0 false false 1 false Default Resource [Default Resource] 1000 true FILE /mirthshare/processed ProcessedFiilesLog.txt true anonymous anonymous 10000 true 0 true true true true false false false DEFAULT_ENCODING ${SYSTIME};${originalFilename} code 0 true
</com.mirth.connect.plugins.javascriptstep.JavaScriptStep>

UDUwODtURVNUXkFOREVSU1NPTg==

DELIMITED
RAW


;
\n
"
true
</quoteEscapeToken>
false
true


,
\n
"
true
</quoteEscapeToken>


Record
0

false






JavaScript






RAW
RAW


JavaScript





JavaScript







File Writer
DESTINATION
true
true


// Modify the message variable below to pre process data
return message;
// This script executes once after a message has been processed
// Responses returned from here will be stored as "Postprocessor" in the response map
return;
// This script executes once when the channel is deployed
// You only have access to the globalMap and globalChannelMap here to persist data
return;
// This script executes once when the channel is undeployed
// You only have access to the globalMap and globalChannelMap here to persist data
return;

true
DEVELOPMENT
false
false
false
false
false
false
STARTED
true


SOURCE
STRING
mirth_source


TYPE
STRING
mirth_type



None




Default Resource
[Default Resource]





true

1757527770821
America/New_York


true
false

1