Inbound Message Rules

Inbound messages are messages that are sent from an external system to the HL7Kit Runtime Service.
Creating a simple Inbound Rules
1. In the main view, select the event type of the incoming message from the event-type combo-box.
The message structure is displayed on the left panel.
2. Select a table from the table list combo box and click the ‘Add Table’ button.
The table structure is displayed on the right panel.
3. Click a field on the right panel and drag it over a column name in the table.
4. Repeat step 3 for other fields.
5. Hover over a database column name to see it’s data type.
6. Hover over a HL7 Message field name to see it’s mapping target.
7. Continue mapping all required fields. Make sure all not-null columns are mapped.
8. When you’re done mapping choose ‘Inbound Test’ from the mapping menu.
9. Select a HL7 message with the same event type to test.
10. If the test fails, the SQL error will be shown.
11. Repeat steps 3 – 9 until the test is successful.

Testing Inbound Rules
In order to test an inbound rule:
1. From the mapping menu select ‘Inbound Test’
2. Open a message file with the corresponding event-type
3. Review the test result
If an error occurs the message shows the SQL error.
Creating a Parent-Child Mapping Rule Example

This example explains how to populate database tables with parent-child structure from a HL7 message.
In this example we’ll use the ORU^R01 message. This message contains a report with optionally many observations.
We will map the data into two tables with parent-child relation:
1. Reports
2. Observations
HL7Kit identifies tables’ relations using foreign-keys. Matching primary and foreign keys are displayed using the same background color in the table layout.