Files


Description

Document and file management system providing comprehensive file storage, organization, and metadata management for healthcare documents, patient records, and administrative files. This table supports hierarchical folder structures, file versioning, access tracking, and document lifecycle management including upload, modification, and deletion tracking for compliance with healthcare documentation requirements and audit trails.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
FileID int identity 4 null

Primary key - Unique identifier for each file or folder record

ParentID int 4 ((0))

Parent folder reference - Links to parent folder for hierarchical file organization (self-referencing foreign key to Files.FileID, 0 for root level)

TableFieldName nvarchar 400 null

Database field association - Links file to specific database table and field for contextual file organization and data relationships

FieldID int 4 null

Field identifier - Specific field ID within the associated table for precise data linking and file context

FileName nvarchar 800 null

System file name - Internal file name used by the system for file storage and retrieval operations

FileSize bigint 8 ((0))

File size in bytes - Size of the uploaded file for storage management and download optimization

Description text 2147483647 null

File description - User-provided description of file contents, purpose, and context for document management and search

OriginalFileName nvarchar 600 null

Original file name - User’s original file name at time of upload for display and reference purposes

ContentType nvarchar 200 null

MIME content type - File type identifier (e.g., application/pdf, image/jpeg) for proper file handling and display

SystemFolder nvarchar 200 null

System folder path - Physical folder location within the file system for file storage organization

IsFolder bit 1 null

Folder flag - Boolean indicator whether this record represents a folder (true) or file (false) for hierarchical navigation

LastWriteTime datetime 16,3 null

Last modification timestamp - Date and time when file was last modified for version tracking and audit purposes

UploadedBy int 4 null

Upload user reference - Links to AccessUser table for the user who uploaded the file for accountability and access control

UploadDate datetime 16,3 null

Upload timestamp - Date and time when file was originally uploaded to the system

DeletedDate datetime 16,3 null

Deletion timestamp - Date and time when file was marked as deleted for soft deletion and audit trail

DeletedBy int 4 null

Deletion user reference - Links to AccessUser table for the user who deleted the file for audit and accountability

EntryID nvarchar 400 null

Entry association - Links file to specific form entries or data records for contextual file organization

Location int 4 null

Service location reference - Links to service delivery location for location-based file organization and access control

oldParentId int 4 null

Previous parent reference - Former parent folder ID for tracking file movement and organizational changes

Indexes

Constraint Name Type Sort Column(s)
PK_files Primary key Asc FileID

Relationships