iNTERFACEWARE Products Manual > Installing and Using Iguana > Using Iguana > Working With the Logs > Accessing the Logs From Other Applications > Using the Message Log ID in VMD Files |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
In Iguana, each message that has been sent through a channel is stored in the log files. Each stored message is associated with a unique message log ID. If your channel uses a VMD file to process a message, any Python script that is written for this VMD file can obtain the ID of the message it is processing. For instance: suppose that you are creating a channel whose destination component is To Database. When you are writing patient data to a table in a database, you can add an additional field to the database and populate it with the ID of the log message that you are processing. You can then use this message log ID to obtain a direct link to the Iguana log entry for this log message. The following diagram shows how message log IDs can be saved and then used to retrieve messages: As an example, suppose that your Iguana channel uses a VMD file to create the following database table:
Now, suppose you want to add a field to this table that contains the message log ID for the log message that generated this data: To populate the MessageID field with the message log ID:
In this script, message.log_id is a predefined variable that contains the ID for the log message that is being processed.
After you have processed a message and loaded its data into the table, you can use the message log ID to display the Iguana log entry for the message. To do this, retrieve the message log ID from the database and create the following URL:
Replace [servername] with the IP address or domain name of your Iguana server, and replace [messagelogid] with the message log ID that is stored in your database.
|