Start a conversation

Introduction to calculations: the basics

  • Introduction to calculation fields and syntax

    Calculation fields in Castor allow you to solve different mathematical problems by using the variables from your eCRF. Common applications of calculations Calculations can be used for simple mathemati...

  • Using the "if-else" logic

    This tutorial will cover what an if/else statement is, when to use it, and how to use it. What is an if/else statement The if/else statement is a logical, conditional expression that evaluates a condi...

  • Forcing Castor to calculate with empty fields

    This tutorial covers the functions you can use to calculate with multiple fields, even if one or more of the values are not set.  The tag '##allowempty##' tells Castor to allow for empty fields to be ...

  • Using the "for loop" in calculations

    In calculations, it is sometimes necessary to repeat a certain action several times. For example, you want to calculate an average of several variables, while some of them are allowed to be empty. In ...

  • Comparing variables with calculation fields

    Comparing two variables In calculations, you sometimes need to compare two variables against each other. Check out the article Using the if-else logic to see how this works. For example, you want to c...

  • Compare several numerical variables against a specific variable

    Check out the article Using the for loop in calculations to see an explanation about how this calculation works. This template allows you to compare three or more fields (variables) with one specific ...