Skip to content

Text Templates

The calculator generates documentation text from customizable templates. This page is a complete reference for the template system - variable syntax, available perspectives, section structure, German gender-inclusive language, and customization options.

For Research Use Only

Generated text is intended for research and educational purposes. It is not validated for clinical use and must be independently reviewed and verified by qualified professionals before use in any clinical or patient-facing context.

Template System Overview

Templates are structured text documents with {{variable}} placeholders that are replaced with your calculation results. The calculator includes pre-built templates in German and English, each available in three perspectives. You can customize templates through the settings dialog.

Settings dialog showing template editor with section toggles
The template editor in settings lets you customize text sections, toggle visibility, and adjust language options.

Variable Reference

All template variables use double curly brace syntax: {{variableName}}. The calculator substitutes each placeholder with the corresponding value from your calculation. Optional variables (such as {{pmid}} and {{populationName}}) are replaced with an empty string when no value is available.

VariableCategoryExample ValueDescription
{{gene}}GeneCFTRGene symbol
{{carrierFrequency}}Frequency4.0%Carrier frequency as percentage
{{carrierFrequencyRatio}}Frequency1:25Carrier frequency as ratio (1 in N)
{{recurrenceRiskPercent}}Risk0.25%Recurrence risk as percentage
{{recurrenceRiskRatio}}Risk1:400Recurrence risk as ratio (1 in N)
{{source}}ContextgnomAD v4.1.0Data source attribution
{{indexStatus}}ContextheterozygousIndex patient status label
{{statusIntro}}ContextA homozygous pathogenic...Status-specific introductory sentence
{{populationName}}ContextEuropean (non-Finnish)Population name (empty if global)
{{pmid}}Context12345678PubMed ID (optional, for literature source)
{{accessDate}}ContextJanuary 19, 2026Formatted data access date
{{genderSuffix}}Formatting*innenGerman gender-inclusive suffix
{{patientNominative}}Formattingder PatientGerman nominative form
{{patientGenitive}}Formattingdes PatientenGerman genitive form
{{patientDative}}Formattingdem PatientenGerman dative form

Using Variables in Custom Templates

Variables use double curly brace syntax. If a variable has no value (for example, the PMID variable when no PubMed ID is provided, or the population name variable when using global results), the placeholder is replaced with an empty string. Write your template sentences to read naturally even when optional variables are absent.

Perspectives

The template system includes three perspectives, each generating text appropriate for a different scenario.

Affected Individual (affected)

For an individual with two identified pathogenic variants. The generated text:

  • Describes the inheritance pattern and the gene-disease relationship
  • Notes that both parents are likely carriers
  • Presents the recurrence risk based on the ÷2 formula

Healthy Carrier (carrier)

For an identified carrier who is not affected. The generated text:

  • Explains what carrier status means
  • Mentions the option of cascade testing
  • Presents the combined risk if a second individual is also a carrier (÷4 formula)

Family Member (familyMember)

For a relative who may consider cascade testing. The generated text:

  • Describes the familial variant and the gene-disease context
  • States the prior probability of being a carrier based on family relationship
  • Explains the option for targeted genetic testing

Template Sections

All templates are divided into eight sections that can be individually enabled or disabled in the settings dialog. The sections are the same across all three perspectives and both languages.

SectionPurposeTypical Content
geneIntroGene and disease introductionGene name, associated condition, basic disease description
inheritanceInheritance patternAutosomal recessive inheritance explanation
carrierFrequencyCarrier frequency dataPopulation carrier frequency with source attribution
recurrenceRiskRisk calculationRecurrence risk specific to patient status
populationContextPopulation specificsPopulation-specific frequency when applicable
founderEffectFounder effect noteHighlighted when population frequency exceeds 5x global
sourceCitationData sourcegnomAD version, access date, optional PubMed ID
recommendationFollow-up recommendationTesting recommendations for related individuals

Disabling a section removes it entirely from the generated text. The remaining sections flow together without gaps.

German Gender-Inclusive Language

The calculator supports four German gender-inclusive writing styles. The selected style determines the value of the genderSuffix and patient* formatting variables throughout the German template.

StyleExampleCommon Usage
Asterisk (*)Anlageträger*innenMost common in Germany; widely recognized
Colon (:)Anlageträger:innenOfficial German public service style guide
Slash (/)Anlageträger/-innenTraditional alternative form
TraditionalAnlageträgerinnen und AnlageträgerFull feminine and masculine form

The gender style affects German output only. English templates do not use gendered patient forms.

Customizing Templates

Adjusting Sections

Open the settings dialog (gear icon in the top-right corner of the results view):

  1. Toggle individual sections on or off - disabled sections are excluded from generated text
  2. Edit section text directly in the template editor
  3. Changes are saved in your browser (localStorage) and persist across sessions
  4. Use the reset button to restore any section to its original default text

Writing Custom Template Text

When editing template text, follow these guidelines:

  • Use {{variable}} syntax for all dynamic values (see the variable table above)
  • Maintain section separation - each section handles one aspect of the text narrative
  • Test with different patient statuses - the statusIntro and risk variables change based on the selected status
  • Handle optional variables gracefully - the populationName variable is empty for global results, so write sentences that work with or without it
  • Keep the section's purpose in mind - each section name describes its role (geneIntro, recurrenceRisk, etc.)
Generated text with all variables substituted and copy button visible
Generated text with all variables substituted. The copy button lets you paste the text for further editing.

See Text Generation for a step-by-step text generation example using HFE and the carrier perspective. See Getting Started for an overview of the results and text generation step. See Filters for how variants are selected before text generation.