skip to main content
Corticon Server: Data Integration Guide : Getting Started with Multiple Database Connectivity : Test the rules when reading from multiple databases

Try Corticon Now

Test the rules when reading from multiple databases

Open the sample's Ruletest, ProcedureApproval.ert. It opens on the Testsheet No Input Data. Click Run to compile and run the rules. The output shows patient and treatment data.
The highlighted treatment attributes differentiate this sample from the ADC sample. Here, information read from the first database provided the lookup value for the read in the second database. And the added Rulesheet simply states that treatments for clinical trials are not approved.

Run test with a different query

Change the Service Call-out's Query Name to IndicatedPatients. Then, return to the Ruletest. When you run the test for the No Input Data testsheet, you get no results. When you run the Testsheet for the One Patient and Multiple Patients Testsheets, you get exactly that one patient and the specified three patients.
The first part of this SQL statement is:
SELECT * FROM Patient WHERE patientId IN ({Patient.patientId})
The curly braces indicate tokens in the query that will be replaced by the data passed to Corticon -- in this case, selecting the patients to process.
Note: For more about the format of Corticon's queries, see How Corticon is expressed in SQL.