> ## 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.

# Governance

> Manage template access, versioning, and quality control

Template governance ensures templates are managed consistently, with proper version control, access management, and quality assurance.

## Governance Overview

Template governance covers:

* Version control and history
* Access and visibility management
* Quality assurance processes
* Lifecycle management

## Version Control

### Version Numbers

Templates use version identifiers:

| Component | Description                    |
| --------- | ------------------------------ |
| **Major** | Significant structural changes |
| **Minor** | New fields or features         |
| **Patch** | Bug fixes or corrections       |

### Version Notes

Document changes with each version:

<Steps>
  <Step title="Make Changes">
    Modify the template as needed.
  </Step>

  <Step title="Update Version">
    Increment the version number appropriately.
  </Step>

  <Step title="Add Notes">
    Document what changed and why.
  </Step>

  <Step title="Save">
    Save the new version.
  </Step>
</Steps>

### Version History

View complete version history:

* All previous versions
* Change notes for each
* Who made changes
* When changes were made

<Accordion title="Viewing Version History">
  Open a template and click "Version History" to see all previous versions and their change notes.
</Accordion>

## Template Status

Templates have lifecycle statuses:

| Status      | Description         | Allowed Actions |
| ----------- | ------------------- | --------------- |
| **Draft**   | In development      | Edit, test      |
| **Active**  | Available for use   | Use in studies  |
| **Retired** | No longer available | View only       |

### Status Transitions

```
Draft → Active → Retired
        ↑
        └── Can create new version
```

<Note>
  Active templates can be updated by creating a new version. The previous version remains available for studies already using it.
</Note>

## Access Management

### Visibility Settings

| Visibility  | Who Can Access            |
| ----------- | ------------------------- |
| **Private** | Organization members only |
| **Public**  | All Carelane users        |

### Author Permissions

| Permission | Who Has It                  |
| ---------- | --------------------------- |
| **Edit**   | Template authors            |
| **View**   | Based on visibility setting |
| **Use**    | Based on visibility setting |

### Making Templates Public

<Steps>
  <Step title="Review Template">
    Ensure template meets quality standards.
  </Step>

  <Step title="Set Status">
    Confirm template is Active.
  </Step>

  <Step title="Change Visibility">
    Update visibility to Public.
  </Step>

  <Step title="Confirm">
    Acknowledge public sharing implications.
  </Step>
</Steps>

<Warning>
  Public templates are visible to all users. Ensure no sensitive or organization-specific content is included.
</Warning>

## Quality Assurance

### Review Process

Establish a review process for templates:

1. **Development**: Author creates template
2. **Peer Review**: Colleague reviews design
3. **Testing**: Test with sample data
4. **Approval**: Governance approval for activation
5. **Publication**: Make active/public

### Quality Checklist

Before activating a template:

* [ ] All fields properly labeled
* [ ] Validation rules configured
* [ ] Conditional logic tested
* [ ] Instructions clear
* [ ] Version notes documented
* [ ] Peer review completed

## Library Management

### Organization Library

Manage your organization's template library:

| Action       | Description              |
| ------------ | ------------------------ |
| **Create**   | Add new templates        |
| **Organize** | Use consistent naming    |
| **Archive**  | Retire unused templates  |
| **Review**   | Periodic quality reviews |

### Using Public Templates

<Steps>
  <Step title="Browse Public Library">
    Search or browse public templates.
  </Step>

  <Step title="Review">
    Examine template before importing.
  </Step>

  <Step title="Import">
    Import a copy to your library.
  </Step>

  <Step title="Customize">
    Modify as needed for your use.
  </Step>
</Steps>

## Study-Template Relationship

### Import Behavior

When you import a template into a study:

* A copy is created in the study
* Original template is not modified
* Study version can be customized
* Updates to original don't affect study

### Template References

Templates may reference other templates:

* Pathways reference questionnaires
* Questionnaires may include library items
* Maintain reference integrity

## Audit Trail

All template actions are logged:

| Event                 | Recorded Information          |
| --------------------- | ----------------------------- |
| **Create**            | Who, when, initial content    |
| **Edit**              | Who, when, what changed       |
| **Status Change**     | Who, when, old/new status     |
| **Visibility Change** | Who, when, old/new visibility |

## Best Practices

<AccordionGroup>
  <Accordion title="Consistent Naming">
    Use clear, consistent naming conventions across templates.
  </Accordion>

  <Accordion title="Document Changes">
    Always document changes in version notes.
  </Accordion>

  <Accordion title="Review Before Activation">
    Have templates reviewed before making them active.
  </Accordion>

  <Accordion title="Retire Carefully">
    Ensure templates aren't in use before retiring.
  </Accordion>

  <Accordion title="Periodic Review">
    Schedule periodic reviews of your template library.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Templates Overview" icon="copy" href="/templates">
    Introduction to templates.
  </Card>

  <Card title="Organization Admin" icon="building" href="/organization-admin">
    Organization management.
  </Card>
</CardGroup>
