HL7 Outbound from OpenEMR

Hi, I am looking for the HL7 Interface module in the OpenEMR, I had request to get generate the HL7 message from openemr system whenever there is any patient record inserted or updated or deleted, I should get the HL7 message from openemr and that HL7 message will be routed to Mirth Connect engine and parse the data and sent to another system database.

I could not able to find any solutions on the community as of now. Could someone clarify is this option available or not. Eg: EPIC EHR has inbuilt HL7 outbound messages once we update our Mirth Endpoint with EPIC or any other EHR we will get the HL7 messages to our Mirth Inbound channels and we do the further business logic.

It is appreciable if anyone can through some positive response for the same.

hi @vijayamirtharajxavie , it’s not possible currently. I think the best approach if you’re up for it is to create a module that listens for the patient created events and act accordingly to have the data flow to a mirth connect instance that will transform it into the hl7 you’re looking for.


Thank you for your response Stephen.

Also thanks again for given the work around ideas, let me check feasible of how to capture the event by using module and then I will update you.


@vijayamirtharajxavie I did not had work outbound mirth connect but I have worked with inbound in mirth connect and into OpenEMR.

@Nilesh_Hake , thanks for your update and I just started by activated the web-hook of patient register/update module and now I am able generate the HL7 message based on the data returned with webhook and started constructing HL7 message and also installed Mirth Connect on the same instance and able to send the HL7 outbound from OpenEMR to Mirth Connect Inbound channel with MLLP protocol.
Also from the anther instance of Mirth Engine I can able to receive the same HL7 message and able to process. Thanks to Stephen given the event listener idea.


Ok @vijayamirtharajxavie

@stephenwaite and @all, I just want to know how to create the custom module on openemr, My goal is to create a table structure from .sql script and store ip, port and other sftp user credentials using that module and also I should able to retrieve the table data at all required pages in openEMR, I have already hard coded the ip, port, user credentials on the source code, so I just want to replace with table data. Can anyone please give me some example code it may require to make the HL7 outbound from OPENEMR. Thanks in advance. Happy Easter to all…

Hi @vijayamirtharajxavie , after you assemble the data from openemr the key is learning how mirth connect can transform that on input to the desired hl7 format export.

1 Like

There are several examples of modules included in current openemr. Plus a little research on the forum could offer some insights however, I doubt anyone is going to give you an ABC on developing your project or write coding examples for interfacing with mirth.
I will advise you to stop hard coding openemr and use the module approach to prevent future difficulties upgrading openemr. We are always ready to accept, if they make sense, new events you can listen for into core openemr to be available for your module.
Or perhaps me and/or @adunsulag are available for consulting or development if sponsored.

Good luck and we hold high hopes for the module feature we are continually developing for use by our vendors and third party developers. So any give back is appreciated and necessary to continue improving this feature!


@stephenwaite , @sjpadgett Thank you for your positive responses and I will make the module with the help of forum community and I will let you all know.

Please Note : I have already setup the Mirth connect in same instance of the docker container and I have configured the HL7 message process on the mirth channel is working fine, my only goal now is that to configure the IP/Port through UI by using openEMR module, this might help with other openEMR community user the make use of it. Thank you once again to both of you.

1 Like