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

# Document Management Guide

> Learn how to upload, organize, version, and share documents in Encore Health OS.

Learn how to upload, organize, version, and share documents in Encore Health OS.

***

## Overview

The Encore Health OS document management system provides:

* **Version Control** - Track changes and restore previous versions
* **Permissions** - Control who can view, edit, or delete documents
* **Categories** - Organize documents in hierarchical folders
* **Tags** - Flexible classification with keywords
* **Full-Text Search** - Find documents by content, not just filename
* **Audit Trail** - See who accessed or modified documents

***

## Uploading Documents

### Upload a Single Document

1. Navigate to **Documents** from the main menu
2. Click **Upload Document**
3. Select file from your computer (or drag-and-drop)
4. Fill in document details:
   * **Title** - Descriptive name
   * **Description** - Brief summary (optional)
   * **Category** - Choose from hierarchy
   * **Tags** - Add relevant keywords
   * **Permissions** - Who can access (see Permissions section)
5. Click **Upload**

### Supported File Types

| Type             | Extensions              | Max Size |
| ---------------- | ----------------------- | -------- |
| **Documents**    | .pdf, .doc, .docx, .txt | 50 MB    |
| **Spreadsheets** | .xls, .xlsx, .csv       | 25 MB    |
| **Images**       | .jpg, .png, .gif        | 10 MB    |
| **Archives**     | .zip, .tar.gz           | 100 MB   |

**Note:** File size limits can be adjusted by administrators.

### Bulk Upload

1. Click **Bulk Upload**
2. Select multiple files
3. Set common properties (category, tags)
4. Review file list
5. Click **Upload All**

***

## Organizing Documents

### Categories

Documents are organized in a hierarchical category tree:

```
Policies & Procedures
├── HR Policies
│   ├── Employee Handbook
│   └── Benefits
├── Clinical Protocols
│   ├── Intake Procedures
│   └── Treatment Guidelines
└── Financial Policies
    ├── Budgeting
    └── Procurement
```

**Creating Categories:**

1. Go to **Documents** → **Manage Categories**
2. Click **New Category**
3. Select parent category (or create at root level)
4. Enter category name and description
5. **Save**

### Tags

Tags provide flexible, cross-category classification:

**Example Tags:**

* `training-material`
* `confidential`
* `archived-2024`
* `requires-review`
* `board-approved`

**Adding Tags:**

* Add tags when uploading
* Edit document → Add/remove tags
* Create new tags on-the-fly

**Tag Best Practices:**

* Use lowercase with hyphens
* Be consistent (don't mix `training` and `training-material`)
* Limit to 5-7 tags per document

***

## Version Control

### How Versioning Works

Every document edit creates a new version:

* **Version 1.0** - Initial upload
* **Version 1.1** - Minor edit (typo fix, formatting)
* **Version 2.0** - Major revision (content change)

**Automatic Versioning:**

* Upload new file with same name → Creates new version
* Edit metadata only → No new version created

### Viewing Version History

1. Open document
2. Click **Version History** tab
3. See all versions with:
   * Version number
   * Upload date/time
   * Uploaded by (user)
   * File size
   * Change notes

### Restoring a Previous Version

1. View version history
2. Click **Restore** next to desired version
3. Confirm restoration
4. Previous version becomes latest version (new version number assigned)

**Example:**

* Current: v3.0
* Restore v1.0
* New current: v4.0 (with content from v1.0)

### Comparing Versions

For text-based documents (.txt, .md, .doc):

1. Select two versions
2. Click **Compare**
3. View side-by-side diff highlighting changes

***

## Document Permissions

### Permission Levels

| Level        | Can View | Can Download | Can Edit | Can Delete | Can Share |
| ------------ | -------- | ------------ | -------- | ---------- | --------- |
| **View**     | ✅        | ✅            | ❌        | ❌          | ❌         |
| **Download** | ✅        | ✅            | ❌        | ❌          | ❌         |
| **Edit**     | ✅        | ✅            | ✅        | ❌          | ✅         |
| **Delete**   | ✅        | ✅            | ✅        | ✅          | ✅         |
| **Owner**    | ✅        | ✅            | ✅        | ✅          | ✅         |

### Setting Permissions

**When Uploading:**

1. In upload dialog, click **Permissions**
2. Choose:
   * **Private** - Only you
   * **Organization** - All org members (view only)
   * **Site** - All site members (view only)
   * **Custom** - Specify users/roles

**For Existing Documents:**

1. Open document
2. Click **Share** or **Permissions**
3. Add users/roles with permission level
4. Click **Save**

### Inherited Permissions

Documents inherit permissions from their category by default:

```
Category: HR Policies
  Permission: HR Department (Edit), All Staff (View)
  
  Document: Employee Handbook
    Inherits: HR Department (Edit), All Staff (View)
```

**Override Inherited Permissions:**

* Click **Override Category Permissions**
* Set custom permissions for document only

***

## Searching Documents

### Quick Search

Use the search bar at the top:

1. Type keywords
2. Results update in real-time
3. Search includes:
   * Filename
   * Title
   * Description
   * Tags
   * **Full-text content** (PDF, Word, txt)

### Advanced Search

Click **Advanced Search** for more options:

**Filter By:**

* **Date Range** - Uploaded between dates
* **Category** - Specific category or subtree
* **Tags** - Documents with specific tags
* **File Type** - .pdf, .doc, etc.
* **Uploaded By** - Specific user
* **File Size** - Min/max size

**Sort By:**

* Relevance (default)
* Upload date (newest/oldest)
* Title (A-Z)
* File size (largest/smallest)

**Example Search:**

```
Keywords: "intake procedures"
Category: Clinical Protocols
Tags: training-material
Date: Last 6 months
File Type: .pdf
```

***

## Sharing Documents

### Share via Link

1. Open document
2. Click **Share** → **Get Link**
3. Configure link:
   * **Access Level** - View only, download, edit
   * **Expiration** - Link expires after date
   * **Require Login** - Authenticated users only
4. **Copy Link**
5. Send link via email, chat, etc.

**Link Example:**

```
https://encoreos.io/documents/abc-123/share?token=<share-token>
```

> ⚠️ Share tokens grant access to documents. Never commit real tokens to documentation or code.

### Share with Users/Roles

1. Open document
2. Click **Share**
3. Enter:
   * User name or email
   * OR role (e.g., "HR Staff", "Site Admin")
4. Choose permission level
5. Add optional message
6. **Send Invitation**

Recipients receive notification with link to document.

***

## Document Preview

### Supported Previews

| Type           | Preview                              |
| -------------- | ------------------------------------ |
| **PDF**        | Full inline viewer with zoom, search |
| **Images**     | Full-resolution viewer               |
| **Word/Excel** | Office Online viewer                 |
| **Text**       | Syntax-highlighted viewer            |
| **Code**       | Syntax-highlighted viewer            |

**Unsupported Types:**

* Download to view locally
* Or request preview support from admin

### Preview Features

* **Zoom In/Out** - Control viewing size
* **Rotate** - PDF and images
* **Search** - Find text in PDF
* **Print** - Print from preview
* **Download** - Save to local computer

***

## Document Workflow

### Approval Workflows

Some documents require approval before publication:

1. Upload document (status: **Draft**)
2. Submit for approval
3. Approver receives notification
4. Approver reviews:
   * **Approve** → Status: **Approved** → Visible to users
   * **Reject** → Status: **Draft** → Requester notified
5. If rejected, edit and resubmit

**Approval Chain:**

* Can require multiple approvers (e.g., Manager → Director → Compliance)
* Each approver gets notification in sequence

### Document Status

| Status               | Meaning             | Visibility           |
| -------------------- | ------------------- | -------------------- |
| **Draft**            | Work in progress    | Uploader only        |
| **Pending Approval** | Awaiting review     | Uploader + Approvers |
| **Approved**         | Ready for use       | Per permissions      |
| **Archived**         | Outdated/replaced   | View-only            |
| **Expired**          | Past effective date | Archived             |

***

## Retention & Archival

### Automatic Archival

Documents can auto-archive based on:

* **Expiration Date** - Set when uploading
* **Last Accessed** - Not viewed in X days
* **Superseded** - Newer version uploaded

### Manual Archival

1. Open document
2. Click **Actions** → **Archive**
3. Confirm archival

**Archived Documents:**

* Remain searchable
* Marked "Archived" in results
* Can be restored by owner/admin

### Deletion

**Soft Delete (Default):**

* Document hidden from view
* Retained for 30 days in **Trash**
* Can be restored within 30 days

**Permanent Delete:**

* Only by owner or org admin
* Cannot be restored
* Requires confirmation

***

## Best Practices

1. **Use Descriptive Titles** - Avoid "Document1.pdf"
2. **Set Expiration Dates** - For time-sensitive docs (policies, notices)
3. **Tag Consistently** - Agree on tagging conventions with team
4. **Review Permissions** - Regularly audit who has access
5. **Version Notes** - Add notes when uploading new versions
6. **Archive Old Versions** - Keep document library clean
7. **Use Categories** - Don't rely solely on search

***

## Troubleshooting

### Upload Failed

**Causes:**

* File too large (check size limits)
* Unsupported file type
* Network issue

**Solutions:**

* Compress large files
* Convert to supported format
* Retry upload

### Can't Find Document

**Check:**

* Permissions (you may not have access)
* Category filters (clear filters)
* Document archived (include archived in search)
* Typo in search query

### Preview Not Loading

**Causes:**

* Large file size
* Browser compatibility
* Unsupported format

**Solutions:**

* Download and view locally
* Try different browser
* Request preview support

***

## For Administrators

### Storage Quotas

Monitor storage usage:

1. Go to **Settings** → **Documents** → **Storage**
2. View:
   * Total storage used
   * Storage by category
   * Largest documents
   * Duplicate files

**Setting Quotas:**

* Per organization
* Per site
* Per user

### Bulk Actions

Administrators can:

* **Bulk Delete** - Remove multiple documents
* **Bulk Archive** - Archive old documents
* **Bulk Permission Change** - Update permissions
* **Bulk Move** - Move to different category

### Audit Reports

Generate document activity reports:

* Documents uploaded (by user, date range)
* Documents accessed (views, downloads)
* Permission changes
* Version history

***

## Support

**Need Help?**

* In-app: Click **Help** → **Document Support**
* Email: [docs-support@example.com](mailto:docs-support@example.com)
* Training: **Help** → **Document Training Videos**

***

**Version:** 3.0.0\
**Last Updated:** 2025-11-29
