skip to main content
Corticon Server: Data Integration Guide : Getting Started with EDC : Test the rules when reading from the database
 

Try Corticon Now

Test the rules when reading from the database

In the EDC sample's Rulesheet, DetermineApproval.ers, its Advanced view's Scope shows that the Patient entity on the Rulesheet is set to Extend to Database, as shown:
This setting tells the rules to get all database records that relate to the query. As the rules do not filter or aggregate data, the results will be more than you might expect.
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.
Right-click anywhere in the output column, and then choose Collapse All, as shown:
Now we can see that all the patient records and their treatments were retrieved.
So too for the One Patient and Multiple Patients Testsheets. That is not what we want in this use case.
Note: Extending to database can produce a variety of useful results. For examples see How data from an EDC Datasource integrates into rule output

Run test without extending to database

In the Rulesheet's Scope, right-click on Patient, and then clear the option to Extend to Database. 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..