Often rules need to access data in both databases and REST services. Corticon lets you access both types of Datasources within a single Decision Service. This section expands on Getting Started with Multiple Database Connectivity sample by adding the retrieval of reimbursement rates as described in the Getting Started with REST sample.

The Multiple Database Connectivity sample Ruleflow contains two steps to retrieve data from a database, (1) Get Patient Data, and (2) Get CMS Details. Step (3) Save Approvals then saves approval decisions to a database.


The REST Connectivity sample Ruleflow contains step (4) Get Rates to retrieve reimbursement rates for a procedure code.


The Mixed Connectivity sample combines these to create a Ruleflow that accesses both databases and a REST service.


The steps in Mixed Connectivity are largely the same as in the other sample Ruleflows with the one note being the Get Rates REST call-out has been configured to perform a retrieve operation – such that it updates existing entities.

Data flow in the sample

In the Ruleflow the interaction of call-outs is as follows:

  • Get Patient Data retrieves information about a patient and the treatments they received from a database. Each treatment has a corresponding medicalCode identifying the treatment.
  • GET CMS Details retrieves detailed information about a type of treatment from a second database by looking up the treatment using its medicalCode.
  • Get Rates retrieves reimbursement rates for a type of treatment by querying a REST service, passing the medicalCode as a query parameter to get rates for a specific type of treatment. Note, the REST service takes the query parameter named procedureCode, the value of medicalCode is passed as the value for procedureCode.
  • Save Approvals saves the decisions on which procedures are approved for each patient back to the patient database.

Explore the sample

  1. Add the Mixed Connectivity sample to your workspace.
  2. Open the vocabulary.


    Note: Patient Data, Treatment Data and Rate Data Datasources are the same as those used in the other samples.
  3. Open the Ruleflow and examine each callout to see the call-out performed and the Datasource used. Corticon allows a Datasource to be used multiple times in a Ruleflow. Each of the Datasources is used one or more times.
  4. Click on Get Rates on the Ruleflow canvas. This is retrieve operation that will require Runtime Properties that include, in this example, procedureCode. While you could type in the name, a pulldown lists the attributes in the primary entity:


  5. Save the Ruleflow.

Run the sample

  1. Open the Ruletest for the sample.
  2. Open the One Patient Testsheet.
  3. Click Run Test.


    The Output shows the data retrieved from each Datasource and the results of the rule processing. Given just the patient ID, Corticon was able to retrieve data from multiple databases and REST data sources, and assemble it according to the vocabulary mappings to allow it to be processed by the rules.