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 Connect | MedHook | Status |
|---|---|---|
| Channel | Workflow | Available |
| Source connector | Trigger | Available for MLLP, HTTP, file readers, databases and HTTP polling; in progress for others |
| Destination connector | Adapter step on a router branch | Available for MLLP, HTTP, SOAP, file writers, databases, SMTP, JavaScript and Document Writers; in progress for others |
| Filter | Filter step or trigger filter | Available |
| Transformer | Data map, XSLT or JavaScript transform step | Available for JavaScript, Mapper, Message Builder and XSLT steps |
| Response transformer | No equivalent stage | In progress |
| Code template libraries | Shared libraries | Available |
| Global map, global channel map | Workflow global map (globals), per workflow | Available |
| Configuration map | Workspace variables | Available |
| Global and channel scripts | No equivalent | In progress |
| Alerts | Alert rules | Available |
| Message store and Message Browser | Executions and message search | Available |
| Data pruner | Per-workflow retention, failed kept longer, archive first | Available |
| Encrypt message content | Encrypt stored messages, per workflow | Available |
| Destination queue | Queue until delivered on the destination, with queue threads | Available, queue threads included; rotate in progress |
| Users and roles | Workspaces and the viewer, operator and admin roles | Available; custom roles in progress |
| Deploy, undeploy, channel revisions | Deploy checklist, versions, rollback | Available |
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.
| Mirth | What the importer does | Status |
|---|---|---|
| Channel | One disabled draft workflow | Available |
| Several destinations | A router with one branch per destination | Available |
| Wait for previous destination | Read. 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 destination | Skipped, with a finding | Available |
| Channel Writer | A Run workflow step. It is not a delivery, so deploy is blocked (ROUTER_BRANCH_NO_SEND). | In progress |
| Channel Writer to None | A Sink (discard) step; a sink exports back as a Channel Writer to None, with a note | Available |
| Channel dependencies and start order | No equivalent | In progress |
| Encrypt message content | The 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 source | MedHook trigger | Status |
|---|---|---|
| TCP Listener (MLLP) | MLLP trigger on the default listener | Available |
| TCP Listener port per channel | A named listener your operator declares in Helm, then picks on the trigger | In progress |
| TCP Listener in Basic TCP / Frame mode, or MLLP with custom bytes | MLLP 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 TCP | Available |
| TCP Listener Data Type Binary | binary on the trigger: the bytes as base64 | Available |
| HTTP Listener | Webhook trigger with a new URL | Available |
| Process Batch on a TCP or HTTP Listener | splitBatches 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 Reader | Manual trigger | Available |
| Database Reader on PostgreSQL, SQL Server, MySQL, Oracle | Polling trigger on an SQL database profile, update statement as post-process | Available |
| Database Reader on other databases | Manual trigger with a finding that quotes the SQL | In progress |
| File Reader over SFTP | SFTP pickup trigger, see below | Available |
| File Reader over FILE, FTP, SMB, WebDAV or S3 | File pickup trigger on a file, ftp, smb, webdav or s3 profile, see below | Available |
| JavaScript Reader | A 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 Listener | SOAP 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 Listener | JMS trigger on a jms profile over AMQP 1.0; the broker's host comes from the broker URL, the password is re-entered | Available |
| DICOM Listener | dicom trigger on the MedHook DICOM listener (Helm dicom.*); the AE title senders call becomes the trigger's called AE title | Available |
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 destination | MedHook step | Status |
|---|---|---|
| TCP Sender (MLLP) | MLLP adapter step (host, port and timeout) | Available |
| TCP Sender TLS settings | Not carried over. The MLLP adapter supports TLS; set it on the profile. | In progress |
| TCP Sender Charset Encoding | encoding on the MLLP profile | Available |
| TCP Sender in Basic TCP / Frame mode, or MLLP with custom bytes | MLLP 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 binary | Available |
| HTTP Sender | Generic 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 SFTP | SFTP adapter step | Available |
| File Writer over S3 | S3 adapter step: bucket and folder on the profile, file name as the object key | Available |
| File Writer over FILE, FTP, SMB or WebDAV | upload 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, Oracle | SQL database execute step, ${var} bound as :var | Available |
| Database Writer on other databases | Left out, with a finding that quotes the SQL | In progress |
| SMTP Sender | SMTP 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 Writer | JavaScript Writer step: the script runs in the sandbox; its return value or responseMap sets the status | Available |
| Web Service Sender | SOAP adapter send step; the envelope becomes the body, credentials are re-entered | Available |
| Document Writer | Document 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 Sender | JMS adapter send step on a queue or topic; the password is re-entered | Available |
| DICOM Sender | DICOM adapter send step (C-STORE); keystores and passcodes are re-entered | Available |
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
baseDiris 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 inFILE_ADAPTER_ROOTS(HelmfileAdapter.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\userorDOMAIN;usergives 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, elsehttp://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 option | MedHook SFTP or file pickup | Status |
|---|---|---|
| Host and directory | The profile's host and port, and remotePath | Available |
| Filename filter, regular expression | filenamePattern, filenameRegex | Available |
| After processing: move, delete, none | afterProcessing: move (with processedPath), delete, leave | Available |
| Error reading action: move | errorPath | Available |
| Check file age | minFileAgeMs (0 when Mirth did not check) | Available |
| Minimum and maximum file size | minFileBytes; maxFileBytes, at most 100 MB | Available |
| Sort by date, name or size | sortBy: modified, name, size | Available |
| Charset UTF-8, ISO-8859-1, windows-1252, US-ASCII or UTF-16LE | encoding (another charset is read as UTF-8, with a finding) | Available |
| Binary | encoding: "binary": the content is the file as base64 | Available |
| Polling frequency | pollInterval, at least 10 seconds | Available |
| Process batch, split by record (Delimited) | One run per CSV row (batch.mode: "rows") | Available |
| Rename on move or on error | The original name is kept, with a finding | In progress |
| Read subfolders, ignore dot files | recursive (never the move-to or error folder), ignoreDot | Available |
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 type | MedHook | Status |
|---|---|---|
| HL7 v2.x | HL7 paths and converters on the raw message | Available |
| Delimited Text, inbound | A csv-parse step with the delimiters, quote, escape, column names and skipped records | Available |
| Delimited Text, outbound | A csv-generate step | Available |
| Delimited Text batch by record | One run per CSV row on an SFTP or file pickup | Available |
| Delimited Text with column widths | A 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 step | Available |
| NCPDP | An ncpdp-parse step inbound, an ncpdp-generate step outbound, with the channel's segment, group and field delimiters | Available |
| XML | An xml-parse step (namespaces stripped as Mirth did) and xpath: paths in filters and steps | Available |
| HL7 v2.x strict validation | An hl7-validate step: segments, order, cardinality, required fields and datatypes against a built-in or JSON profile | Available |
Filters
Mirth filters keep their meaning: a rejected message is filtered, not an error. Filters describes the MedHook side.
| Mirth | MedHook | Status |
|---|---|---|
| Rule Builder filter | A rules-mode filter step | Available |
| JavaScript filter | A filter step with one expression, marked for review | Available |
| Source filter on an MLLP or HTTP source | The trigger's filter | Available |
MSH-9.1 equals rules, all ANDed | The MLLP trigger's message types | Available |
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.
| Mirth | What the importer does | Status |
|---|---|---|
| JavaScript transformer step | Copied into the JavaScript step, marked for review | Available |
E4X message tree (msg['PID']['PID.5'], new XML()) | Runs: msg and tmp are Mirth's tree for HL7 v2, XML and delimited data | Available |
Literal E4X syntax (<PID/>, msg..OBX, .@id) | Copied with a warning; the AI rewrite converts it | In progress |
| Message Builder setting an HL7 field | A row in a Copy and edit data map, see below | Available |
| Mapper read only by those Message Builders | Folded into their rows. A Mapper nothing reads is left out, with a finding. | Available |
| Other Mapper and Message Builder steps | The JavaScript Mirth generates for the step, on HL7 v2, XML, JSON and delimited data | Available |
| XSLT step | An xslt step with the stylesheet and result variable | Available |
Outbound template (tmp) | tmp starts as the template in the outbound data type; the step sends tmp | Available |
| Destination steps after an XML or delimited source | The destination gets the source's text and runs on Mirth's tree | Available |
| Rule Builder rule inside a transformer | Kept as a comment, not enforced | In progress |
| Response transformer | Not 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 message | Available |
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 libraries | Shared libraries at v1, pinned by the channels they are enabled for | Available |
| Deploy script: literal global map puts | The workflow's globals, set on import | Available |
| Preprocessor script | The workflow's first JavaScript step; its return value replaces the message | Available |
| Postprocessor script | A JavaScript step after every destination, with responseMap holding their responses | Available |
| Global preprocessor and postprocessor scripts | The same steps in every workflow imported from the server backup | Available |
| Deploy and undeploy scripts | Not imported; each non-default one is a REVIEW finding (a global one on every channel) | In progress |
| Custom metadata columns, attachment handlers | Not imported; a REVIEW finding names each | In 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 alert | MedHook | Status |
|---|---|---|
| Queue backlog | queue_size rule | Available |
| No messages received | no_messages rule, with an active window | Available |
| Error alert | error_rate rule, a percentage of failed executions | Available |
| Error alert by error type or text | error_match rule: error type, failing step, adapter, or text the error contains. Regular expressions are not supported. | Available |
| Email and channel actions | PagerDuty, Slack, webhook and email | Available |
| Other targets (Teams, SNMP) | Use the webhook target | In progress |
Messages, queues and retention
| Mirth | MedHook | Status |
|---|---|---|
| Message Browser | Executions and message search | Available |
| Reprocess a message | Replay, including one destination | Available |
| 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/reprocess | Available; every match and another workflow through the API only |
| Errored and queued messages | Messages › Needs action: view, replay, skip | Available |
| Destination queue that retries until the endpoint returns | Queue until delivered | Available |
| Destination Queue Settings | Import 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 time | Available; Rotate is reported, not mapped (in progress) |
| Custom metadata columns | No equivalent | In progress |
| Per-channel storage mode | Every execution stores input and step output | In progress |
| Data pruner | Per-workflow age-based retention | Available |
| Archive before prune | Execution archive: expired executions are written to a directory before they are deleted | Available |
| Keep errored messages when pruning | Per-workflow Keep failed executions for: failed runs are kept longer than the rest | Available |
| Import Messages | Batch replay as a dry run or an MLLP send, not into history | In 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.
| Mirth | MedHook | Status |
|---|---|---|
| Users | People with a role per workspace | Available |
| Roles | Viewer, operator and admin | Available |
| Custom roles with per-area permissions | Three fixed roles | In progress |
| Event log | Tamper-evident audit log | Available |
| Deploy and undeploy a channel | Deploy checklist: validation, passing test, approval | Available |
| Channel revision history | Versions, diff and rollback | Available |
| Pause or halt a channel | Enable and disable the workflow | In progress |
| Export a channel | Workflow export, or export to Mirth | Available |
| Full server configuration backup | Configuration backup: one file with every workflow, alert rule and setting | Available |