Test the rules when reading from multiple databases
- Last Updated: February 7, 2018
- 1 minute read
- Corticon
- Documentation
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.
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.