The TFL Template Library is a place for you to define reusable TFL metadata templates (titles, footnotes, and instructions). These templates are then used to automatically define groups of TFLs for analysis projects.
Each TFL template defines the common metadata for a type of TFL. The template specifies the type, class, name, number, program, titles, and footnotes that will be used when creating instances of this TFL for an analysis.
Titles and footnotes use a special token system to allow dynamic replacement. Read the Tokens section below for more details.
Template titles and foonotes are simply text. When a TFL is created using a template, the pre-defined titles and footnotes will be created automatically. Sometimes there will be a set of TFLs that are all very similar except for one small difference in a title or footnote. This is what the token system is for.
Tokens are defined by enclosing a token name in curly brackets (e.g. {TOKEN_NAME}). An example of how this looks in practice is below.
Template Title: Serious Adverse Events by {AE_GROUP}
Using the template above, the following outputs could be created:
There are two additional types of token. Optional tokens are tokens that may be left blank by the user if desired. An optional token is enclosed in curly brackets, followed by a single colon before the token name (e.g. {:OPTIONAL_TOKEN_NAME}). An example of how this looks like practice is below.
Template Title: {:AE_TYPE} Adverse Events by {AE_GROUP}
Using the template above, the following outputs could be created:
It is also possible to have the entire title or foonote be a token:
Template Title: {:TITLE_3}
This will let the user optionally define a third title or leave it off.
Candid has a third type of token, system tokens. These are tokens that are automatically replaced by Candid and cannot be modified by the user. This type of token is defined by prefixing the token name with a dollar sign (e.g. $SYSTEM_TOKEN). There are only two system tokens currently defined, $STUDY and $WORKING_DIRECTORY. An example of this in practice is below.
Template Title: Zeroarc Study $STUDY
Using the template above, the following output could be created:
You can create as many TFL template groups as you need. These groups are an easy way to organize TFL templates logically.