Hi everyone, please check out our new discussion forum located in our GitHub site: https://github.com/nextgenhealthcare/connect/discussions. Let us know your feedback as we try out this new part of GitHub! Don't worry, the content in these forums won't be going away and will at a minimum be preserved for historical reference.
Can Mirth detect if there have been any update or insert in a field of the database that is connected to, and if so do any action? How? (I guess in an outbound channel?).
If you are looking to pull the data out and write to a file or to another database (without creating HL7) then you want an inbound channel with a DB Reader source endpoint.
If you want to create HL7 messages from the data, you should use an outbound channel.
Essentially, you specify the SQL select statement to run that checks for certain conditions (SELECT id FROM db_name WHERE updated = TRUE);
Then in the UPDATE you would put something like:
(UPDATE db_name SET updated = FALSE WHERE id = ${id})
This checks for all fields in the db at a polling interval and finds all rows where updated = true. It pulls down the data (each row will be a seperate message in Mirth) and then runs the update (so that the subsequent polls do not pull in the already processed data).
What if I cannot modify the database in order to add the field 'updated'? I mean. Is able Mirth to 'listen' the database and act if it detectsa new record inserted?.
Other question, in an outbound channel, how does mirth create the HL7 message? As a destination I have a file in certain folder. It creates the file but with nothing inside.
Mirth is only able to poll the database. If there is no way to indicate that a record has been processed by Mirth on the db, then you will end up pulling down ALL records, ALL the time. You of course could filter this, but it is not an ideal architecture.
Is there a time-stamp on the database? You might be able to have Mirth poll at a large interval and only pull data that has been added or updated based on the timestamp.
For the outbound channel you define an HL7 sample message as the template. In the transformer you drag segments from the message into a HL7 Message Builder then define what you want updated. For example if you're reading from a database, you would drag the segment from the sample hl7 message tree to the "Segment" field and then drag your database variable from the variable list to the mapping.
We are working on documentation and tutorials to assist in this process and are aiming to have them ready for the 1.2 release (approx 3 weeks).
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment