Version: 1.0Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Last Updated: 2026-01-08
Constitution Reference: Section 1.3 (Integration Patterns), Section 5.2 (Database Design)
Purpose: Unified guide to the data management platform capabilities in Encore Health OS. This document explains how PF-15 (Picklists), PF-16 (Custom Fields), PF-17 (Field Configuration), PF-23 (Object Browser), PF-24 (Custom Objects), PF-25 (Raw Data Editor), and PF-26 (Object Permissions) work together.
Overview
The Encore Health OS data management platform provides a comprehensive set of capabilities for organizations to customize, manage, and interact with their data. These capabilities are built on Platform Foundation (PF) and provide reusable patterns for all domain cores.Component Diagram
Legend:- Solid arrows: Direct dependencies (PF-16 uses PF-15)
- Dotted arrows: Consumer relationships (cores use platform features)
Component Relationships
Data Flow
-
Picklists (PF-15) → Custom Fields (PF-16)
- Select/multiselect fields reference picklists via
picklist_id - Single source of truth for dropdown values
- Select/multiselect fields reference picklists via
-
Custom Fields (PF-16) → Field Configuration (PF-17)
- Field definitions are configured for visibility, ordering, permissions
- Field Configuration manages how Custom Fields appear in UI
-
Custom Fields (PF-16) → Custom Objects (PF-24)
- Custom objects use PF-16 field definitions for their schema
- Reuses validation rules and field types
-
Custom Objects (PF-24) → Object Browser (PF-23)
- Custom objects automatically appear in Data Manager
- Unified view of core objects + custom objects
-
Object Browser (PF-23) → Raw Data Editor (PF-25)
- Raw Data Editor is a tab in Object Browser detail view
- Enables bulk editing of object records
-
Object Browser (PF-23) → Object Permissions (PF-26)
- Permissions tab in Object Browser detail view
- Configure access control per object
Decision Tree: When to Use What
Integration Patterns
Pattern 1: Platform Integration Layer
All data management features are provided as Platform Integration Layers:| Feature | Location | Public API |
|---|---|---|
| PF-15 Picklists | /src/platform/picklists/ | usePicklists, usePicklistItems, PicklistSelector |
| PF-16 Custom Fields | /src/platform/custom-fields/ | useCustomFieldDefinitions, CustomFieldInput, CustomFieldsSection |
| PF-17 Field Config | /src/platform/field-config/ | useEntityFieldConfigs, ConfigurableForm, ConfigurableDetailView |
| PF-23 Data Manager | /src/platform/data-manager/ | useObjectMetadata, DataManagerPage, ObjectDetailPage |
| PF-24 Custom Objects | /src/platform/data-manager/ | useCustomObjects, useCustomObjectRecords, CreateCustomObjectDialog |
| PF-25 Raw Data Editor | /src/platform/data-manager/ | useRawData, RawDataTable, RawDataImportWizard |
| PF-26 Object Permissions | /src/platform/data-manager/ | useObjectPermissions, ObjectPermissionsTab |
Pattern 2: Event-Based Integration
Organizational data changes (PF-18) use event-based integration:org_data_changedevents published viapg_notify- Modules subscribe and update local data structures
- See PF-18 spec for event contracts
Pattern 3: API Contracts
Data Manager provides query APIs for object metadata:- Object discovery API
- Field metadata API
- Record count API
- See PF-23 spec for API contracts
Common Workflows
Workflow 1: Adding Custom Data to Core Entities
Scenario: Add “Badge Number” field to HR Employees-
Create Picklist (if needed) - PF-15
-
Define Custom Field - PF-16
-
Configure Field Layout - PF-17 (optional)
-
Use in Forms - Module Integration
-
View in Data Manager - PF-23
Workflow 2: Creating a Custom Entity
Scenario: Create “Clinical Licenses” custom object-
Create Custom Object - PF-24
-
Add Fields - PF-16 + PF-24
-
Import Existing Data - PF-25
-
Configure Permissions - PF-26
-
View in Data Manager - PF-23
Workflow 3: Managing Organization Data Structure
Scenario: Organize all objects by category-
Browse Objects - PF-23
-
Edit Metadata - PF-23
-
Manage Categories - PF-23
-
Set Favorites - PF-23
Workflow 4: Bulk Data Operations
Scenario: Export employees, edit offline, import updates⚠️ Security Note - PHI Protection for CSV Operations: CSV exports may contain Protected Health Information (PHI) and require additional safeguards:See
- Encryption: Ensure CSV files are encrypted at rest (disk encryption) and in transit (secure download over HTTPS)
- Access Control: Restrict export functionality to authorized staff with appropriate permissions; verify user has
{module}.{entity}.exportpermission- Audit Logging: All export and import operations are logged (who, what data, when, row counts) in
pf_audit_log- Import Validation: Imported CSVs are integrity-checked (column validation, data type verification, row count confirmation) to detect tampering
- Secure Handling: Downloaded CSV files should be stored in encrypted locations; delete files after import is confirmed successful
- Offline Security: When editing CSVs offline, use password-protected devices; avoid storing on shared/unencrypted drives
- High-Sensitivity Orgs: Organizations handling highly sensitive PHI (e.g., behavioral health clinical notes) should consider disabling CSV export entirely via organization settings; use secure API-based integrations instead
docs/security/DATA_EXPORT_POLICY.mdfor complete export security guidelines.
-
Export Data - PF-25
-
Edit Offline
-
Import Updates - PF-25
Quick Reference Table
| Need | Solution | Key Component | Location |
|---|---|---|---|
| Custom dropdown values | PF-15 Picklists | PicklistSelector | /settings/picklists |
| Add field to entity | PF-16 Custom Fields | CustomFieldsSection | /settings/custom-fields |
| Control field layout | PF-17 Field Config | ConfigurableForm | /settings/field-config |
| Browse all objects | PF-23 Object Browser | DataManagerPage | /data-manager |
| Create new entity | PF-24 Custom Objects | CreateCustomObjectDialog | /data-manager → Create Object |
| Bulk edit records | PF-25 Raw Data Editor | RawDataTable | Object detail → Raw Data tab |
| Set permissions | PF-26 Object Permissions | ObjectPermissionsTab | Object detail → Permissions tab |
Module Adoption
| Module | Picklists | Custom Fields | Field Config | Custom Objects | Data Manager |
|---|---|---|---|---|---|
| HR | ✅ 8 | ✅ 12+ | ✅ 2 layouts | ⚠️ Planned | ✅ Browse |
| FA | ✅ 12 | ✅ 8+ | ⚠️ Planned | ❌ N/A | ✅ Browse |
| RH | ✅ 4+ | ✅ 6+ | ⚠️ Planned | ⚠️ Planned | ✅ Browse |
| FW | ✅ 4 | ✅ Form-level | ✅ Form builder | ❌ N/A | ✅ Browse |
| GR | ✅ 2+ | ✅ 3+ | ❌ Not Started | ❌ N/A | ✅ Browse |
| FM | ✅ 2+ | ✅ 4+ | ❌ Not Started | ❌ N/A | ✅ Browse |
| IT | ✅ 2+ | ✅ 3+ | ❌ Not Started | ❌ N/A | ✅ Browse |
- ✅ Complete
- ⚠️ Planned
- ❌ Not Started / N/A
Performance Considerations
Query Optimization
- Picklists: Cached with 5-minute staleTime (QueryClient config)
- Custom Fields: Indexed on
(organization_id, entity_type, is_active) - Object Metadata: Computed fields (
field_count,record_count) cached - Raw Data: Pagination required (25/50/100 per page)
Scalability Limits
| Feature | Limit | Mitigation |
|---|---|---|
| Picklists per org | 100 | Archive inactive picklists |
| Custom fields per entity | 50 | Group fields into sections |
| Custom objects per org | 100 | Archive inactive objects |
| Records per custom object | 100,000 | Use pagination, indexes |
| Hierarchy depth | 10 levels | Materialized views for deep hierarchies |
Security Considerations
Multi-Tenant Isolation
All data management features enforce organization-level isolation:- RLS policies on all tables (
organization_idfilter) - Application-level defense-in-depth (explicit
organization_idin queries) - No cross-organization data access
Role-Based Access
| Feature | View | Create/Edit | Delete |
|---|---|---|---|
| Picklists | org_member | org_admin | org_admin (non-system only) |
| Custom Fields | org_member | org_admin | org_admin |
| Field Config | org_member | org_admin | org_admin |
| Object Metadata | org_member | org_admin | org_admin |
| Custom Objects | org_member | org_admin | org_admin |
| Raw Data | org_member | org_member | org_member |
| Object Permissions | org_member | org_admin | org_admin |
Related Documentation
- PF-15: Picklist System
- PF-16: Custom Field Definitions
- PF-17: Entity Field Configuration
- PF-23: Data Manager - Object Browser
- PF-24: Custom Objects
- PF-25: Raw Data Editor
- PF-26: Object Permissions
- Platform Integration Layers
- Constitution (current: see docs/VERSIONS.md)
Last Updated: 2026-01-08
Next Review: Quarterly or when new data management features are added