Skip to content
Reference

Migrating from Mirth Connect

How each Mirth Connect concept maps to MedHook, what the Mirth importer converts today, and which gaps are in progress.

On this page

This page maps Mirth Connect concepts to MedHook ones, row by row. Each row says what the Mirth importer does with it and whether MedHook covers it today. For the import and export steps themselves, read Migrate from Mirth Connect. In the engine, Workflows › Mirth → MedHook guide shows the same concepts with a link to where each one lives in your workspace.

A row marked Available works on the current engine. A row marked In progress is a gap MedHook is working on. The engine parity overview summarises every open item.

The short version

Mirth ConnectMedHookStatus
ChannelWorkflowAvailable
Source connectorTriggerAvailable for MLLP, HTTP, file readers, databases and HTTP polling; in progress for others
Destination connectorAdapter step on a router branchAvailable for MLLP, HTTP, SOAP, file writers, databases, SMTP, JavaScript and Document Writers; in progress for others
FilterFilter step or trigger filterAvailable
TransformerData map, XSLT or JavaScript transform stepAvailable for JavaScript, Mapper, Message Builder and XSLT steps
Response transformerNo equivalent stageIn progress
Code template librariesShared librariesAvailable
Global map, global channel mapWorkflow global map (globals), per workflowAvailable
Configuration mapWorkspace variablesAvailable
Global and channel scriptsNo equivalentIn progress
AlertsAlert rulesAvailable
Message store and Message BrowserExecutions and message searchAvailable
Data prunerPer-workflow retention, failed kept longer, archive firstAvailable
Encrypt message contentEncrypt stored messages, per workflowAvailable
Destination queueQueue until delivered on the destination, with queue threadsAvailable, queue threads included; rotate in progress
Users and rolesWorkspaces and the viewer, operator and admin rolesAvailable; custom roles in progress
Deploy, undeploy, channel revisionsDeploy checklist, versions, rollbackAvailable

Channels and workflows

A Mirth channel becomes one MedHook workflow. The importer, served by POST /api/migration/mirth/preview and POST /api/migration/mirth/apply, reads a single channel, a list of channels or a full server configuration from Mirth 3.x or 4.x. Every imported workflow is a disabled draft that keeps the Mirth channel id in its metadata. Importing the same channel again reports the existing draft instead of making a copy.

Migration › Import takes a Mirth export or reads a running Mirth server with a read-only API user. The guided wizard, under Import from Mirth or Rhapsody on the Workflows page, also reads channels from a live Mirth server, lists the systems they talk to, converts them, and replays recent Mirth messages through a draft as a dry run so you can compare the output with what Mirth sent. It is a one-time read, not a live sync.

MirthWhat the importer doesStatus
ChannelOne disabled draft workflowAvailable
Several destinationsA router with one branch per destinationAvailable
Wait for previous destinationRead. If any destination waits, the router runs every destination one after another, in Mirth's order, and a finding names each one that did not wait.Available
Disabled destinationSkipped, with a findingAvailable
Channel WriterA Run workflow step. It is not a delivery, so deploy is blocked (ROUTER_BRANCH_NO_SEND).In progress
Channel Writer to NoneA Sink (discard) step; a sink exports back as a Channel Writer to None, with a noteAvailable
Channel dependencies and start orderNo equivalentIn progress
Encrypt message contentThe workflow's Encrypt stored messages setting, and back again on export (encryptData)Available

Source connectors and triggers

A Mirth source connector becomes the workflow's trigger, as the table below shows. A channel whose source has no mapping is Blocked and is not converted.

Mirth sourceMedHook triggerStatus
TCP Listener (MLLP)MLLP trigger on the default listenerAvailable
TCP Listener port per channelA named listener your operator declares in Helm, then picks on the triggerIn progress
TCP Listener in Basic TCP / Frame mode, or MLLP with custom bytesMLLP trigger, plus a finding with the Helm mllp.listeners entry to declare: framing frame (start and end bytes) or eos (no end bytes), response, maxConnections, idleTimeoutMs. Data that is not HL7 has no message type; see Raw TCPAvailable
TCP Listener Data Type Binarybinary on the trigger: the bytes as base64Available
HTTP ListenerWebhook trigger with a new URLAvailable
Process Batch on a TCP or HTTP ListenersplitBatches on the trigger: one execution per message, split by MSH. A JavaScript batch script is not imported (a finding says so).Available
Charset Encoding (TCP Listener), Charset (HTTP Listener)charset on the trigger: UTF-8, ISO-8859-1, Windows-1252 or ASCII. Another charset is left at UTF-8 with a finding.Available
Channel ReaderManual triggerAvailable
Database Reader on PostgreSQL, SQL Server, MySQL, OraclePolling trigger on an SQL database profile, update statement as post-processAvailable
Database Reader on other databasesManual trigger with a finding that quotes the SQLIn progress
File Reader over SFTPSFTP pickup trigger, see belowAvailable
File Reader over FILE, FTP, SMB, WebDAV or S3File pickup trigger on a file, ftp, smb, webdav or s3 profile, see belowAvailable
JavaScript ReaderA polling trigger. A script that is a plain HTTP poll with a literal URL gets a Generic REST profile, its headers and its cursor; any other script gets a polling trigger with no profile and a finding to fix by hand.Available for HTTP polls; other scripts in progress
Web Service ListenerSOAP trigger at /api/triggers/soap/mirth-<channel id> with a WSDL for Mirth's acceptMessage; HTTP authentication is not imported (set WS-Security or an HMAC secret)Available
JMS ListenerJMS trigger on a jms profile over AMQP 1.0; the broker's host comes from the broker URL, the password is re-enteredAvailable
DICOM Listenerdicom trigger on the MedHook DICOM listener (Helm dicom.*); the AE title senders call becomes the trigger's called AE titleAvailable

Destination connectors and adapters

A Mirth destination becomes an adapter step on its router branch, plus an adapter profile with no credentials, as the table below shows. A destination with no mapping is left out of the draft and named in the findings.

Mirth destinationMedHook stepStatus
TCP Sender (MLLP)MLLP adapter step (host, port and timeout)Available
TCP Sender TLS settingsNot carried over. The MLLP adapter supports TLS; set it on the profile.In progress
TCP Sender Charset Encodingencoding on the MLLP profileAvailable
TCP Sender in Basic TCP / Frame mode, or MLLP with custom bytesMLLP adapter step with framing, startBytes and endBytes (eos for no end bytes). HL7 data checks the ACK; other data types set responseCheck: none. Keep Connection Open, Ignore Response and Data Type Binary map to keepConnectionOpen, expectAck and binaryAvailable
HTTP SenderGeneric REST adapter step. Auth type starts as none, and credential headers are dropped. The proxy carries over; set a client certificate or CA on the profile.Available
HTTP Sender URL with ${variables}A variable in the path is kept, with a finding to fix it by hand; one in the host leaves the destination out. Set the URL by hand.In progress
File Writer over SFTPSFTP adapter stepAvailable
File Writer over S3S3 adapter step: bucket and folder on the profile, file name as the object keyAvailable
File Writer over FILE, FTP, SMB or WebDAVupload step on a file, ftp, smb or webdav profile. Append and error-if-exists go on the profile (writeMode); writes use a temp file then a rename.Available
Database Writer on PostgreSQL, SQL Server, MySQL, OracleSQL database execute step, ${var} bound as :varAvailable
Database Writer on other databasesLeft out, with a finding that quotes the SQLIn progress
SMTP SenderSMTP adapter send step: host, port, encryption and timeout on the profile; recipients, subject, body, headers and attachments on the step. The login is re-entered; plain SMTP keeps a warning.Available
JavaScript WriterJavaScript Writer step: the script runs in the sandbox; its return value or responseMap sets the statusAvailable
Web Service SenderSOAP adapter send step; the envelope becomes the body, credentials are re-enteredAvailable
Document WriterDocument Writer step: PDF or RTF, written to a folder in FILE_ADAPTER_ROOTS or passed on as the step output. The PDF password is re-entered.Available
JMS SenderJMS adapter send step on a queue or topic; the password is re-enteredAvailable
DICOM SenderDICOM adapter send step (C-STORE); keystores and passcodes are re-enteredAvailable

Credentials are never imported, including values in CDATA sections. Re-enter them on each adapter profile the import report lists. Each connector the import leaves out gets a finding that names it and says what to do instead.

A File Writer over S3 keeps the bucket and folder on the S3 profile and turns the file name into the object key (${message.messageId} becomes ${executionId}). The S3 step writes its input as it arrives: text as is, an object as JSON. An HL7 message from an MLLP or webhook trigger is an object, so set the step's body field to rawMessage to write the HL7 text. Mirth's default AWS credentials have no equivalent: enter an access key on the profile. The S3 adapter refuses an object key or folder with a . or .. segment at run time, so check a file name built from message values. A login written into the File Writer's location (user:password@host) is never imported or shown in the findings.

File Reader options

A File Reader over SFTP becomes an sftp trigger and an SFTP adapter profile with no password. Over FILE, FTP, SMB, WebDAV or S3 it becomes a file trigger and a profile of that adapter, with no password or access key:

  • FILE: the profile's baseDir is the deepest folder the read, move-to and error folders share, and each folder becomes a path inside it. A Windows path loses its drive letter. The operator mounts the folder and lists it in FILE_ADAPTER_ROOTS (Helm fileAdapter.mounts).
  • FTP: host, port and folder; anonymous logs in with no user name. Mirth's FTP is plain, so the profile is too, with a finding to switch to FTPS.
  • SMB: the first folder is the share; DOMAIN\user or DOMAIN;user gives the domain. A server that requires SMB 3 gets a finding: MedHook's client speaks SMB 2.x.
  • WebDAV: https:// when Secure Mode is on, else http:// with a finding.
  • S3: bucket and folder, region from the S3 settings.

The options map like this on every scheme. What has no equivalent is a finding in the import report.

Mirth File Reader optionMedHook SFTP or file pickupStatus
Host and directoryThe profile's host and port, and remotePathAvailable
Filename filter, regular expressionfilenamePattern, filenameRegexAvailable
After processing: move, delete, noneafterProcessing: move (with processedPath), delete, leaveAvailable
Error reading action: moveerrorPathAvailable
Check file ageminFileAgeMs (0 when Mirth did not check)Available
Minimum and maximum file sizeminFileBytes; maxFileBytes, at most 100 MBAvailable
Sort by date, name or sizesortBy: modified, name, sizeAvailable
Charset UTF-8, ISO-8859-1, windows-1252, US-ASCII or UTF-16LEencoding (another charset is read as UTF-8, with a finding)Available
Binaryencoding: "binary": the content is the file as base64Available
Polling frequencypollInterval, at least 10 secondsAvailable
Process batch, split by record (Delimited)One run per CSV row (batch.mode: "rows")Available
Rename on move or on errorThe original name is kept, with a findingIn progress
Read subfolders, ignore dot filesrecursive (never the move-to or error folder), ignoreDotAvailable

For a File Reader channel end to end, see Lab results from a Windows share. For a PostgreSQL Database Reader, see Database Reader to FHIR.

Data types

A channel's inbound and outbound data types become data type steps at the start and end of its transform steps. See Transforms.

Mirth data typeMedHookStatus
HL7 v2.xHL7 paths and converters on the raw messageAvailable
Delimited Text, inboundA csv-parse step with the delimiters, quote, escape, column names and skipped recordsAvailable
Delimited Text, outboundA csv-generate stepAvailable
Delimited Text batch by recordOne run per CSV row on an SFTP or file pickupAvailable
Delimited Text with column widthsA fixed-width-parse step (columns of those widths, named from Column Names or column1…), or one run per record with batch by record; outbound, a fixed-width-generate stepAvailable
NCPDPAn ncpdp-parse step inbound, an ncpdp-generate step outbound, with the channel's segment, group and field delimitersAvailable
XMLAn xml-parse step (namespaces stripped as Mirth did) and xpath: paths in filters and stepsAvailable
HL7 v2.x strict validationAn hl7-validate step: segments, order, cardinality, required fields and datatypes against a built-in or JSON profileAvailable

Filters

Mirth filters keep their meaning: a rejected message is filtered, not an error. Filters describes the MedHook side.

MirthMedHookStatus
Rule Builder filterA rules-mode filter stepAvailable
JavaScript filterA filter step with one expression, marked for reviewAvailable
Source filter on an MLLP or HTTP sourceThe trigger's filterAvailable
MSH-9.1 equals rules, all ANDedThe MLLP trigger's message typesAvailable

Transformers and scripts

Mapper and Message Builder steps on HL7 v2 messages become a data map where they can. The other Mapper and Message Builder steps become the JavaScript Mirth generates for them (see Mirth Mapper and Message Builder steps), and other transformer steps are copied. Together they become one JavaScript transform step, marked for review. The step starts with shims for msg, $(), channelMap and the other Mirth maps, so simple scripts keep working. See Transforms.

MirthWhat the importer doesStatus
JavaScript transformer stepCopied into the JavaScript step, marked for reviewAvailable
E4X message tree (msg['PID']['PID.5'], new XML())Runs: msg and tmp are Mirth's tree for HL7 v2, XML and delimited dataAvailable
Literal E4X syntax (<PID/>, msg..OBX, .@id)Copied with a warning; the AI rewrite converts itIn progress
Message Builder setting an HL7 fieldA row in a Copy and edit data map, see belowAvailable
Mapper read only by those Message BuildersFolded into their rows. A Mapper nothing reads is left out, with a finding.Available
Other Mapper and Message Builder stepsThe JavaScript Mirth generates for the step, on HL7 v2, XML, JSON and delimited dataAvailable
XSLT stepAn xslt step with the stylesheet and result variableAvailable
Outbound template (tmp)tmp starts as the template in the outbound data type; the step sends tmpAvailable
Destination steps after an XML or delimited sourceThe destination gets the source's text and runs on Mirth's treeAvailable
Rule Builder rule inside a transformerKept as a comment, not enforcedIn progress
Response transformerNot imported; a REVIEW finding names it. Read the reply in a step after the send.In progress
Channel map, response map ($c, $r)Carried between JavaScript steps of the same messageAvailable
Global map, global channel map ($g, $gc)The workflow's global map (globals), per workflow; Mirth's is server-wide.Available
Configuration map ($cfg)Workspace variables, read-only. A credential-looking key is a secret with no value.Available
Code template librariesShared libraries at v1, pinned by the channels they are enabled forAvailable
Deploy script: literal global map putsThe workflow's globals, set on importAvailable
Preprocessor scriptThe workflow's first JavaScript step; its return value replaces the messageAvailable
Postprocessor scriptA JavaScript step after every destination, with responseMap holding their responsesAvailable
Global preprocessor and postprocessor scriptsThe same steps in every workflow imported from the server backupAvailable
Deploy and undeploy scriptsNot imported; each non-default one is a REVIEW finding (a global one on every channel)In progress
Custom metadata columns, attachment handlersNot imported; a REVIEW finding names eachIn progress

A Message Builder converts when it sets a field of msg (msg['PID']['PID.5']['PID.5.1']) from an HL7 path, a text value or a Mapper variable. Its default and its replacements, when they are plain text, become the row's default and replace ops. The data map edits the message in place (Copy and edit) and skips a row whose segment isn't in the message; Mirth added the segment. A step that reads a segment an earlier row wrote starts a new data map, because a data map reads its input as the step began. A Mapper is folded in only when the builder reads the map the Mapper writes ($c or channelMap for channel scope, $co or connectorMap for connector scope, or $(), which searches every map); a read from the other map finds nothing in Mirth, so the row writes the builder's default. A Mapper is left out when nothing in the channel names its variable; a read through a dynamic key ($(name + 'Id')) can't be seen, and the finding says to check for one. A step named like a credential (password, token) with a value or default stays JavaScript with that value redacted. HL7 field, repetition and component numbers go up to 999. A step with JavaScript, a regular-expression replacement, the outbound template (tmp), or a variable that another part of the channel reads becomes the JavaScript Mirth generates for it, as does any Mapper or Message Builder on an XML, JSON or delimited channel. On an XML or delimited channel the source's parse step runs after those steps, so they edit Mirth's tree; a delimited message is Mirth's <delimited><row><column1> tree, written back as delimited text. A transformer with an outbound template becomes one JavaScript step in which tmp starts as the template and is what the step sends, as in Mirth. A destination whose steps read XML or delimited data gets the source's text, and the parse step moves to the other destinations. See Outbound template and Delimited data. A step stays unconverted when its template can't be imported (another data type, over 1 MB, or holding a credential), when its delimited properties can't be read, or when the SFTP pickup splits the delimited file into rows. The Mirth export writes these data maps back as Message Builder steps. When a row reads a field an earlier row writes, the export first copies the message (var mhSource = msg.copy();) and every builder reads the copy, as the data map does; those steps re-import as JavaScript.

Alerts

The importer does not read Mirth alerts. Recreate them as engine alert rules, described in Engine alert rules.

Mirth alertMedHookStatus
Queue backlogqueue_size ruleAvailable
No messages receivedno_messages rule, with an active windowAvailable
Error alerterror_rate rule, a percentage of failed executionsAvailable
Error alert by error type or texterror_match rule: error type, failing step, adapter, or text the error contains. Regular expressions are not supported.Available
Email and channel actionsPagerDuty, Slack, webhook and emailAvailable
Other targets (Teams, SNMP)Use the webhook targetIn progress

Messages, queues and retention

MirthMedHookStatus
Message BrowserExecutions and message searchAvailable
Reprocess a messageReplay, including one destinationAvailable
Reprocess results (bulk)Reprocess a search: Replay {n} on Messages for the loaded results of one workflow; every match, through the same or another workflow, by POST /api/messages/reprocessAvailable; every match and another workflow through the API only
Errored and queued messagesMessages › Needs action: view, replay, skipAvailable
Destination queue that retries until the endpoint returnsQueue until deliveredAvailable
Destination Queue SettingsImport and export map Queue Messages (queueEnabled), the retry interval (retryIntervalMillis), Queue Threads (threadCount, to queue.threads) and the thread assignment variable (threadAssignmentVariable, to queue.threadKey); one thread keeps strict order, one message at a timeAvailable; Rotate is reported, not mapped (in progress)
Custom metadata columnsNo equivalentIn progress
Per-channel storage modeEvery execution stores input and step outputIn progress
Data prunerPer-workflow age-based retentionAvailable
Archive before pruneExecution archive: expired executions are written to a directory before they are deletedAvailable
Keep errored messages when pruningPer-workflow Keep failed executions for: failed runs are kept longer than the restAvailable
Import MessagesBatch replay as a dry run or an MLLP send, not into historyIn progress

Users, roles and deploys

The importer does not read Mirth users. Invite people to a workspace and give each one a role. See Roles and Workspaces.

MirthMedHookStatus
UsersPeople with a role per workspaceAvailable
RolesViewer, operator and adminAvailable
Custom roles with per-area permissionsThree fixed rolesIn progress
Event logTamper-evident audit logAvailable
Deploy and undeploy a channelDeploy checklist: validation, passing test, approvalAvailable
Channel revision historyVersions, diff and rollbackAvailable
Pause or halt a channelEnable and disable the workflowIn progress
Export a channelWorkflow export, or export to MirthAvailable
Full server configuration backupConfiguration backup: one file with every workflow, alert rule and settingAvailable

Reference