Example: Outbound select statement

To build an interface that queries a database for patient documents from incoming HL7 messages, you must query the database by the patient MRN and Visit Number.

To do this:

  1. Configure a Database Connection named “documents” and create a new thread named “check_docs".
  2. Select database-outbound as the protocol and click Properties.
  3. Select the documents database connection and click Configure to open the SQL Configurator dialog box.
  4. Click Select and configure the fields to be returned as a reply message.

After the interface is deployed, the MRN and Visit number are extracted from the inbound transactions. The “check_docs” thread queries the database with the MRN and Visit number. Any documents returned in the result set are returned to the engine as a reply message.