Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This page describes how to use Mirth to connect OpenMRS to other systems.

Before the REST web services module, OpenMRS had a Mirth Messaging Module which probably shouldn't be used anymore.

Our specific case is connecting OpenMRS for importing and exporting data to another database in the same MySQL instance. Below is a diagram.

Questions

  1. How to connect Mirth using the REST web services module
    1. Should the REST web services work for both incoming and outgoing messages?  The comment at the end of the page describes that it would only work for outgoing messages.
  2. How to trigger a channel for outgoing messages?
    1. In our case we are going to export data from OpenMRS to a MySQL database table. So my guess is that we should be able to either schedule this every so many minutes or hours. Can we also trigger than on an update of a patient it sends the data via OpenMRS REST to Mirth?
  3. How to trigger a channel for incoming messages?
    1. We are going to import the data from a table in a separate MySQL database. Again, our idea is based on a schedule, but could we trigger Mirth on an update of that table?

Below is an initial explanation (translated via google from spanish to english)

one hand, a Mirth channel where you configure a Web Service Listener displays a wsdl that works like a normal web service, for all purposes.

REST Web Services OpenMRS, if a server is running OpenMRS, other programs can connect to obtain and update data in the database OpenMRS (get / add patient encounters, orders ...)

If you want to keep the two databases synchronized (OpenMRS + Financial System), so that the financial system sends data to the database of OpenMRS guess you only need to use the REST Web Services module Module. You can also use a Mirth channel that detects when the data in a table (Database Reader source connector) and when this happens, the connector using the REST target Web Services Module for OpenMRS update the DB.

If what you want is to export data to another DB OpenMRS, you can easily use a Mirth channel receive data through a Web Service Listener making use of Mirth Messaging Module as a client, but 'tuneándolo' to be able to understand customized web service (as we have done in our client module of Mirth). We do not know enough about the REST Web Service Module to ensure that it is able to perform this part (connect to an external web service to modify an external DB), but if comentaís that is the best solution if you understand that.

Therefore, to summarize:
- If a table changes in database connection, you can make a channel that detects Mirth (Database Reader) and synchronize the data in the database Digital Health (OpenMRS) using REST Web Services Module connector on your destination.

- If something changes in OpenMRS require updates in Database Connection, you can connect with Mirth OpenMRS our way (with Mirth Messaging Module) and then use the Database Writer in the destination connector. We do not know in this case if you could use REST Web Services Module, I think it is not for this, but we do not know enough to secure outright.

  • No labels