> ## Documentation Index
> Fetch the complete documentation index at: https://docs.carelane.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Templates

> Create reusable questionnaires, workflows, and pathways

Templates enable you to create reusable components that can be shared across studies and organizations. Build once, use many times.

## Template Overview

<CardGroup cols={2}>
  <Card title="Questionnaire Templates" icon="file-lines" href="/templates/questionnaire-templates">
    Create reusable data collection forms.
  </Card>

  <Card title="Workflow Templates" icon="diagram-project" href="/templates/workflow-templates">
    Design task sequences for site operations.
  </Card>

  <Card title="Pathway Templates" icon="route" href="/templates/pathway-templates">
    Build participant journey schedules.
  </Card>

  <Card title="Governance" icon="shield-check" href="/templates/governance">
    Manage template access and versioning.
  </Card>
</CardGroup>

## Template Types

Carelane supports three template types:

| Type              | FHIR Resource  | Purpose                        |
| ----------------- | -------------- | ------------------------------ |
| **Questionnaire** | Questionnaire  | Data collection forms (CRFs)   |
| **Workflow**      | PlanDefinition | Site operational tasks         |
| **Pathway**       | PlanDefinition | Participant activity schedules |

## Template Lifecycle

<Steps>
  <Step title="Create">
    Design the template in the template library.
  </Step>

  <Step title="Test">
    Validate the template before sharing.
  </Step>

  <Step title="Publish">
    Make the template available for use.
  </Step>

  <Step title="Import">
    Import into studies where needed.
  </Step>

  <Step title="Customize">
    Optionally customize for study-specific needs.
  </Step>
</Steps>

## Template Library

The template library is organized by:

### Organization Templates

Templates created within your organization:

* Private to your organization
* Full edit access for organization members
* Can be made public to share

### Public Templates

Templates shared for public use:

* Available to all Carelane users
* Read-only (import to customize)
* Governed by template publishers

## Template Visibility

| Visibility  | Who Can See          | Who Can Edit          |
| ----------- | -------------------- | --------------------- |
| **Private** | Organization members | Authors               |
| **Public**  | All users            | Original authors only |

## Working with Templates

### Creating Templates

<Steps>
  <Step title="Navigate to Templates">
    Go to Organization > Templates.
  </Step>

  <Step title="Create New">
    Click "Create Template" and select type.
  </Step>

  <Step title="Design">
    Build the template using the appropriate editor.
  </Step>

  <Step title="Save">
    Save the template to your library.
  </Step>
</Steps>

### Using Templates in Studies

<Steps>
  <Step title="Open Study Design">
    Navigate to Study Design in your study.
  </Step>

  <Step title="Import Template">
    Click "Import from Template" and select the template.
  </Step>

  <Step title="Customize">
    Modify the imported template for study-specific needs.
  </Step>

  <Step title="Save">
    Save the customized version to your study.
  </Step>
</Steps>

## Version Control

Templates support versioning:

* Track changes over time
* Version notes for documentation
* Previous versions accessible

<Note>
  When you import a template into a study, you create a copy. Changes to the original template don't automatically update studies.
</Note>

## Best Practices

<AccordionGroup>
  <Accordion title="Design for Reuse">
    Build templates with reusability in mind. Avoid study-specific details that limit reuse.
  </Accordion>

  <Accordion title="Use Clear Names">
    Name templates clearly so they're easy to find and understand.
  </Accordion>

  <Accordion title="Document Purpose">
    Include descriptions explaining what the template is for.
  </Accordion>

  <Accordion title="Version Thoughtfully">
    Create new versions for significant changes; document what changed.
  </Accordion>
</AccordionGroup>
