web stats
Mirth Community - View Single Post - DB Modifications
View Single Post
  #2  
Old 09-21-2006, 12:39 AM
chrisl chrisl is offline
Mirth Employee
 
Join Date: Aug 2006
Posts: 967
chrisl is an unknown quantity at this point
Default Re: DB Modifications

Yes, Mirth will poll a database for changes.

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).

-Chris
__________________
Chris Lang
Reply With Quote