Monday, 23 May 2016

Custom Metadata in Mirth Connect

Have you ever wanted to see more details on Mirth's channel dashboard? It would certainly be handy if you could see the patients Id, but depending on the purpose of your channel there might be all sorts of relevant information - Visit ID, Referring Doctor, Etc.

Fortunately Mirth supports this with the feature they have called "Mirth Custom Meta Data".


It's also pretty easy to use, if a little non intuitive. In your channel, navigate to the summary tab and then add fields to the Custom Metadata section


Here I have added a Patients name variable to the existing two (these two are here by default when the channel is created - they can be removed if you don't like them).

The column name is how you would like it to be named on the dashboard. It is pretty restrictive on allowed characters, so don't expect to put in a space or anything like that - basically you are defining a database column in the D_MCMx table in Mirth's database.


The data type also correlates with the database type, so choose one that suits your data.

The Variable Mapping just creates a variable name. It doesn't accept expressions, so you will have to populate your variable elsewhere, most likely in your source transformer like so.


Here I am mapping the HL7 PID.3.1 to my PatientId variable.

That's it, I've done it. The best thing is that not only can I easily identify patients on my dashboard, but also searching for them is much faster (if you have ever run a search for text in the dashboard you will know how painfully slow it normally is).

Further, I can just as easily add any other fields I find useful.


  1. Are you able to put an array of ids in the custom metadata?

  2. this is really useful. thank you!