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

# File Uploads

> Upload and manage documents, results, and reports

## Overview

bLIS supports file uploads for attaching documents, external results, and reports to subjects and accessions. This allows you to maintain a complete patient record including scanned documents, reference lab PDFs, and other supporting materials.

## Upload Types

bLIS supports three types of uploads:

| Type         | Purpose                     | Common Files                                 |
| ------------ | --------------------------- | -------------------------------------------- |
| **DOCUMENT** | General documents and forms | Requisitions, consent forms, insurance cards |
| **RESULTS**  | External test results       | Reference lab PDFs, radiology reports        |
| **REPORT**   | Final laboratory reports    | Completed test reports, amended reports      |

## Upload Fields

Each upload stores:

| Field             | Description                                    |
| ----------------- | ---------------------------------------------- |
| Name              | Original filename                              |
| File Path         | Storage location on server                     |
| Size              | File size in bytes                             |
| MIME Type         | File format (e.g., "application/pdf")          |
| Type              | Upload category (DOCUMENT, RESULTS, or REPORT) |
| Subject ID        | Patient/donor this file belongs to             |
| Accession ID      | (Optional) Specific accession                  |
| Created At        | Upload timestamp                               |
| Created By        | User who uploaded the file                     |
| Send Notification | Whether to notify on upload                    |

## Uploading Files

### Via Accession Detail

1. Open the accession
2. Go to the **Files** tab
3. Click **Upload File**
4. Select file type (Document, Results, or Report)
5. Choose file from your computer
6. Optionally check **Send Notification** to alert stakeholders
7. Click **Upload**

The file is immediately available in the accession record.

### Via Subject Record

1. Navigate to the subject/patient
2. Go to **Documents** section
3. Click **Add Document**
4. Select upload type
5. Choose file
6. Upload completes

Files uploaded at the subject level are available across all accessions for that patient.

<Tip>
  Upload documents at the subject level for items that apply to multiple accessions (insurance cards, consent forms). Upload results at the accession level for test-specific documents.
</Tip>

## Supported File Types

### Recommended Formats

* **PDF** (`.pdf`): Best for scanned documents and reports
* **Images** (`.jpg`, `.png`, `.tiff`): Photos, scanned images
* **Text** (`.txt`, `.csv`): Data files, result lists

### File Size Limits

* Maximum file size: Typically 10-25 MB per file
* For large files, consider compression or splitting
* Contact administrator if limits need adjustment

<Warning>
  Very large files (>25 MB) may cause upload timeouts. Compress PDFs or reduce image resolution if possible.
</Warning>

## Use Cases

### Reference Laboratory Results

When sending tests to reference labs:

1. Create the accession in bLIS
2. Send sample to reference lab
3. When results arrive (email, fax, portal):
   * Download the PDF/report
   * Upload as **RESULTS** type to the accession
4. Optionally enable **Send Notification** to alert pathologist
5. Review and finalize as needed

### Scanned Requisitions

For paper-based requisitions:

1. Scan the requisition form
2. Create accession in bLIS
3. Upload scanned requisition as **DOCUMENT**
4. File is available for reference if questions arise

### External Reports

When importing results from other systems:

1. Export report from external system
2. Upload as **REPORT** type
3. Link to appropriate accession
4. Results are preserved even if external system purges data

### Supporting Documentation

Attach supporting materials:

* Insurance authorization forms → **DOCUMENT**
* Previous test results for comparison → **RESULTS**
* Physician orders or notes → **DOCUMENT**
* Imaging reports for correlation → **RESULTS**

## Viewing Uploaded Files

### In Accession View

All files attached to an accession appear in the **Files** tab:

* Organized by upload type
* Sortable by date or name
* Click to download/view
* Shows who uploaded and when

### In Subject View

All files for a patient across all accessions:

* Grouped by accession (if applicable)
* Includes subject-level documents
* Timeline view shows upload history

## Notifications

When uploading files, you can trigger email notifications:

1. Check **Send Report Notification** when uploading
2. Configured recipients receive email alert
3. Email includes:
   * Subject/patient identifier
   * Accession number
   * Upload type
   * Link to view file

<Info>
  Notification recipients are configured per organization in **Administration** → **Notifications**. Only users with "REPORT" notification type enabled will receive alerts.
</Info>

## Managing Uploads

### Deleting Files

To remove an uploaded file:

1. Navigate to the file in accession or subject view
2. Click **Delete** or trash icon
3. Confirm deletion

<Warning>
  Deleted files are permanently removed. Ensure you have backups before deleting important documents.
</Warning>

### Replacing Files

To update or replace a file:

1. Upload the new version
2. Delete the old version (if needed)
3. Both versions remain in audit log

There's no automatic versioning - use clear filenames to distinguish versions (e.g., "Report\_v2.pdf").

### Bulk Uploads

For uploading multiple files at once:

* Some interfaces support drag-and-drop of multiple files
* Files are processed sequentially
* Each file gets its own upload record
* All inherit the same upload type

## File Storage

### Where Files Are Stored

Uploaded files are stored:

* On the bLIS server filesystem (not in database)
* Path stored in `filePath` field
* Organized by date or accession number
* Backed up according to system backup schedule

### Security

File access is controlled by:

* User authentication (must be logged in)
* Organization access (can only see files for allowed orgs)
* Role permissions (read-only users cannot upload)

Files are:

* Not publicly accessible via URL
* Served only to authenticated users
* Protected by application-level security

### Backup and Retention

Upload files should be:

* Included in regular system backups
* Retained according to regulatory requirements (typically 7+ years)
* Archived when old accessions are archived
* Protected from accidental deletion

Check with your administrator for specific backup policies.

## API Upload

For programmatic uploads via API:

```bash theme={null}
# Example: Upload a PDF result
curl -X POST https://your-tenant.blis.app/api/uploads \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@results.pdf" \
  -F "type=RESULTS" \
  -F "subjectId=12345" \
  -F "accessionId=67890" \
  -F "sendReportNotification=false"
```

API uploads support:

* All upload types
* Notification triggering
* Metadata specification
* Batch processing

See API documentation for full endpoint details.

## Best Practices

### Organization

* Use consistent naming conventions for uploaded files
* Include dates in filenames (e.g., "RefLab\_2026-02-15.pdf")
* Choose appropriate upload type (DOCUMENT vs RESULTS vs REPORT)
* Delete duplicate or obsolete files promptly

### Quality

* Upload high-quality scans (300 DPI minimum for text)
* Use PDF format for multi-page documents
* Compress large files before uploading
* Verify files are readable before uploading

### Compliance

* Don't upload files containing unrelated patient information
* Ensure uploaded results match the correct patient
* Include all relevant documentation for accessions
* Maintain uploaded files for required retention period

### Workflow

* Upload reference lab results as soon as received
* Attach requisitions at accession creation
* Enable notifications for urgent results
* Review uploaded files before finalizing accessions

## Troubleshooting

### Upload Fails or Times Out

**Causes:**

* File too large
* Network connection interrupted
* Server storage full
* Invalid file format

**Solutions:**

* Compress the file and try again
* Check internet connection
* Contact administrator if server issues
* Verify file format is supported

### Cannot See Uploaded File

**Check:**

* User has access to the accession's organization
* File was uploaded to correct accession/subject
* User role has file viewing permissions
* File upload actually completed successfully

### Wrong File Uploaded

**Resolution:**

1. Upload the correct file
2. Delete the incorrect file
3. Action is logged in audit trail
4. Notify supervisor if error affects patient care

### Notification Not Sent

**Verify:**

* "Send Report Notification" was checked during upload
* Organization has notification recipients configured
* Notification type includes REPORT
* Email addresses are correct

Check **Administration** → **Notifications** to review delivery status.

## Regulatory Considerations

### CLIA/CAP Requirements

Maintain documentation:

* Reference lab results and certifications
* QC documentation
* Proficiency testing results
* Instrument maintenance records

Upload these as DOCUMENT or RESULTS type for easy access during inspections.

### HIPAA Compliance

Uploaded files may contain PHI:

* Ensure secure transmission (HTTPS)
* Control access via user permissions
* Include in security risk assessments
* Log all file access for audit purposes

### Retention Requirements

Different file types may have different retention periods:

* Laboratory reports: Typically 7-10 years minimum
* QC records: 2-3 years minimum
* Requisitions: 7 years minimum
* Insurance documents: Per payer requirements

Consult regulatory requirements for your jurisdiction.
