| If you want the output of the calculation to be... | Examples | |
| a number | Use a calculated field | BMI, Age |
| a date | Use @CALCDATE | Find date 30 days after input date, etc. |
| text | Use @CALCTEXT | Check the value of several fields at once- for instance, if screening question answers indicate a participant is eligible for a study |
(Note: some text below is taken from the REDCap Help & FAQ page)
Calculated fields can only return numerical values. You should use a calculated field any time you want REDCap to give you back a number, such as calculating a BMI or the number of days between two dates. Note that it is possible to use dates as input to calculated fields, as long as the result will be number (such as age), and not another date.
@CALCTEXT is an action tag you can use on a text field that can return a text value. For example, you can use this if you have an "if" statement and you want REDCap to display the word "TRUE" if the result is true and "FALSE" if the result is false. @CALCTEXT always returns text.
@CALCDATE is an action tag you can use on text field that is validated as a date or datetime. It will calculate a date or datetime a specific amount of time away from a date you give it. For example, if you know the discharge date and want to schedule a follow up ten days later, you can use @CALCDATE to tell you what day the follow up should be.
Rule H: Run Rule H to update calculated fields, or fields that use the action tags @CALCDATE and @CALCText.