About Custom Algorithms

For user-defined resources and indirect costs, you can create custom algorithms to generate the level of effort hours (for resources) or monetary value (for costs).

Prerequisites

  • Only visible in Advanced and Expert Modes.
  • User must be assigned one of these two roles:
    • Advanced Algorithm Editor: Users with this role have permissions to create or edit cost or resource algorithms with multiple expressions. This additional role/capability can only be granted to Power User, Clinical Administrator, or System Administrator users.
    • Expert Algorithm Editor: Users with this role have permissions to create or edit cost or resource algorithms by creating custom mathematical formulas via a scripting language. The scripting language used to define the formulas is based on JavaScript. This additional capability can only be granted to Power User, Clinical Administrator, or System Administrator users.

You can use the following to create your algorithms:

  • Multiple Expressions (Advanced mode)
  • Scripted Algorithms (Expert mode)

When defining a user-defined resource's algorithm in Task Manager or defining a user-defined pass-through cost on the Costs tab, in Advanced Edit Mode, you can build your custom algorithms using multiple expressions with multiple cost drivers, including a percentage of a cost driver, per expression.

Best practice is to use the multiple expressions functionality to define your algorithms, whenever possible. However, if you are unable to produce the correct level of effort in hours or monetary cost value using multiple expression algorithms, ClearTrial offers Enterprise Edition Expert Mode users the ability to create and define custom mathematical formulas via a scripting language.

The scripting language used to define the formulas is based on JavaScript.

ClearTrial exposes all of a plan's assumptions as variables to use in these formulas as well as a few precalculated values useful for creating algo-rithms.

When dealing with algorithms, there are two concepts to understand:

  • Expression—Elements of an algorithm.

    For resources, the expression includes input parameters for hours, cost driver, and percentage to apply to the cost driver.

    Example: 1.5 hours per 50% of sites = one expression. If the number of sites is 10, then the value of the expression is 7.5 hours (1.5 hours * 0.50 * 10 sites).

    For costs, the expression includes input parameters for monetary value, currency, cost driver, and percentage to apply to the cost driver.

    Example: 250 EUR per 50% of sites = one expression. If the number of sites is 10, then the value of the expression is 1,250 EUR (250 EUR * 0.50 * 10 sites).

  • Algorithm—One or more expressions whose total value evaluates to the level of effort in hours required for the resource to complete the task or whose total value evaluates to the monetary value in a specific currency for a cost item.

    Example of resource algorithm: If an algorithm has 3 individual expressions and the value of each expression is 7.5 hours, 2 hours and 3.25 hours, respectively, then the total value of the algorithm is 12.75 hours (7.5 + 2 + 3.25).

    Example of cost algorithm: If an algorithm has 3 individual expressions and the value of each expression is 1,250 EUR, 500 EUR and 2,000 EUR respectively, then the total value of the algorithm is 3,750 EUR (1,250 + 500 + 2,000).