OpenMRS Version: I have OpenMRS standalone 2.2 version installed on my system.
I need to send HL7 message to Mirth Connect when a new patient is created. How can I configure OpenMRS to do this? I came across this page : https://wiki.openmrs.org/pages/viewpage.action?pageId=13599071
Has HL7 Output project been completed or is it still in progress?
Hi @vundamat, that module never was completed, but this was https://wiki.openmrs.org/display/docs/HL7Query+Module. Does this suit your needs?
@surangak Thanks a lot! I had a look at the link that you have mentioned. I need to send HL7 messages automatically to MirthConnect when a new patient is created. Do you think I can do that using this module?
I assume that Mirth Connect is not running on the same machine as OpenMRS? We had a similar requirement, but both Mirth and OpenMRS were running on the same machine so we we were able to a use a somewhat-hacky queue by having them both connect to the same database.
@mogoodrich Could you please tell me how you could do that?
Thanks in advance!
Sure @vundamat… you can see what we are doing here:
In summary, we listen for order events using the Events module (OrderEventListener). Then, whenever an Order is created, we convert that order into an HL7 message (OrderToPacsConverter) and store in an new OutboundQueue domain object that we created which maps to a fairly simple pacs_outbound_queue table in the OpenMRS database that has a “processed” column that acts as flag to designate whether or not that row has been processed.
Then we created a user in the OpenMRS database that solely has access to that table in the database. In Mirth, we created a “Database Reader” connecter that queries that table at regular intervals for any records that have not been processed:
SELECT outbound_queue_id, message FROM pacsintegration_outbound_queue
WHERE processed=0 ORDER BY date_created ASC;
… and then updates the process column after it processes them them:
UPDATE pacsintegration_outbound_queue SET processed=1
Thanks a lot for sharing this valuable information with me!
So, in order to complete my task (to detect when a patient is created in OpenMRS and send patient information to Mirth), I would have to first listen for the CREATE event using the Events module right?
Yes, that is the way we did it, but I’m sure there are other approaches you could take.