It's also worth noting that in Mirth Connect 3.0, you will have the ability to add custom metadata columns on a per-channel basis, which are stored in the database and indexed on. So for example, you might add a "Sending Application" column to your channel, and use a transformer to pull the data out of MSH.3.1. In addition to storing this value in a separate database column, you could then view that column easily for each message in the Channel Messages screen, and even -search- on that column. It's especially useful for things like patient IDs, names, accession numbers, etc.
The 3.0 GA will be released later this year, but the first beta has already been released: http://www.mirthcorp.com/community/forums/showthread.php?t=8126