views:

453

answers:

1

Mirth is a broker to help with healthcare application HL7 message integration.

My question is about saving yourself the trouble of hitting your own datastore everytime you want to do a lookup on some data contained within the HL7.

Scenario: for each message received by the channel, I want to find the facility's mnemonic/code/ID and get the full name of the facility. Unfortunately I cannot ask the sender of the HL7 message to send it along in the message for me. So I have to write my own DB access code to call a stored procedure, pass in the ID, and receive the full name.

Any idea on how to create a cache of data in Mirth so that you can access the lookup from any channel, source, destination, transformer or filter?

+1  A: 

You could try writing a global script with two functions:

1) Populate a Java hastable or similar construct with the data you are looking for

2) Use the parameter you pass in as the key to the hashtable and return the data contained in the hashtable corresponding to this key.

Link to using Java in Mirth (link)

Jason Irwin
Thanks Jason; I actually learned a lot from your blog post. Kudos for posting the how-to! I have the implementation, which I will post in the question when I can. Thanks again!
p.campbell
Glad to help - i'll be interested to hear if the solution worked!
Jason Irwin

related questions