Open ghost opened 9 years ago
The short answer is "yes". We can either generate HL7 messages in FreeMED's code or have the Mirth connector generate the messages from the database.
Reference is this:
https://github.com/freemed/freemed/blob/master/lib/org/freemedsoftware/core/MirthExport.class.php
Essentially, whenever we fire off a supported event (which is one of the Generator
classes), we check to see if MirthExport
is configured, and if it is, we send a SOAP message to the defined endpoint of type acceptMessage
.
For example, this is the A04 generation code:
It's called here:
during add_post()
(which is called after an entry is added).
I just put together a reference page in the FreeMED wiki for implementation here:
Thank you very much for such a quick reply. Would it be better to have the code generate the HL7 messages or have Mirth pull them from the database?
It's probably smarter to have FreeMED's code generate the messages, since they would be fired off when the corresponding event occurred, rather than periodically when Mirth would choose to search for new events.
Is it possible to send HL7 messages out of FreeMED? I have Mirth Connect running and it is connected to the MIrth SOAP endpoint. My company is testing software that needs to read HL7 messages and so far FreeMED appears to be the closest platform I have found to get us there.