|
Defining a TableThe table grammar determines which tables will be populated in the database. You must first define each table and determine the primary key field that will be used to determine uniqueness in the database.
To create a new table:
![]() The columns defined in the table will map exactly to the columns of the table defined in the database. Iguana will prompt you to automatically export the tables defined in the table grammar directly to the database when you finish setting up the channel that uses this VMD (this is explained later in this tutorial). The next step is to define your table in Chameleon to store the information you want to capture. The goal of this tutorial is to capture the following data:
To define the table:
When you are finished defining the table, it should closely resemble the one below: ![]() Patient Table Defined Iguana functions by taking each incoming record and executing a SELECT statement for the primary key. If the key is present, Iguana executes an update query putting in the changed information. If it is not present, Iguana generates an insert query to create a new row in the database table. So, the result of receiving an A04 message for a patient whose ID is already in the Patient table is simply an update of the column values. If the patient is not already in the database, then an insert is performed on this table. |