Factory Plugin Rules

Plugin rules allow you to produce rules that are not possible using the other rule types. A plugin rule uses a plugin that runs an Integrator or Spectre Build script. The plugin launches an external process that determines the rule values. It provides data that is computed during the factory build process to that external process and then joins the result of that process back into the data set. This allows you to use complex logic, while still taking advantage of the automatic data flow management that the factory provides.

NOTE: Plugin rules are different from Setup plugin rules, which are derived from a plugin-input type. For more information, see Factory Setup Rules.

Plugin rule schematic.

The plugin-rule tags are placed within the data-set block as shown in the following example:

data-set "Accounts" {

cbase-input "/data/accounts.cbase"

calc-rule "Admission" `value("Patient Type") = "Inpatient" and not value("Newborn")`

plugin "Concat" {

input "Input" data-set="Charges" {

column "Key" rule="Account ID"

column "String" rule="Revenue Description"

}

dimension "Key" rule="Account ID"

plugin-rule "All Revenue Descriptions" column="Concat"

}

}

This example:

  • Adds the Concat plugin to the Accounts data set
  • Connects the Charges data set to the input of the plugin
  • Specifies to use Account ID as the Key and Revenue Description as the String
  • Specifies that to merge the plugin output back into Accounts, match the output Key with Account ID, and call the Concat result All Revenue Descriptions.

See also: