Skip to main content

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.

Status: 📋 Planned (spec reviewed and accepted 2026-03-24)
Spec: specs/pf/specs/PF-88-tenant-onboarding-data-import.md
Plan: specs/pf/plans/PF-88-tenant-onboarding-data-import-PLAN.md
Last updated: 2026-03-24

Purpose

Document how the tenant onboarding and batch import framework (pf_import_*, pf_onboarding_sessions) integrates with Data Manager (PF-23/24/25), bulk operations (PF-47), terminology validation (PF-70), and downstream cores (HR, PM, FA) without core-to-core imports.

Scope

  • In scope: Import adapters (CSV/XLSX/JSON), field-mapping UI, batch pipeline, deduplication, onboarding wizard orchestration, tenant-scoped storage, RLS, permission keys from the spec.
  • Out of scope: Live/API sync (PF-63/65/66), outbound export (PF-44), form-submission-only import (FW-02).

DocumentRelationship
PLATFORM_INTEGRATION_LAYERS.mdCores consume @/platform import APIs; no CL↔HR direct imports
CROSS_CORE_INTEGRATIONS.mdMatrix row for PF-88
PF-23 Data ManagerTarget schemas and single-entity CSV paths; PF-88 adds multi-entity onboarding
PF-70 Medical TerminologyValidation hooks for coded fields on clinical/billing imports
.cursor/rules/bulk-import-patterns.mdShared CSV / edge vs client / progress patterns

Consumer obligations (HR / PM / FA / others)

  1. Use platform import APIs and shared UI components; do not duplicate pf_import_* RLS or storage paths in domain cores.
  2. Mutations must include organization_id (defense in depth) when writing target entities created from imports.
  3. PHI: Treat uploaded source files as PHI artifacts; mask previews per spec; no PHI in logs, toasts, or analytics payloads.

Auth and tenant isolation

  • All pf_import_* and pf_onboarding_sessions rows are scoped by organization_id with RLS (pf_has_org_access pattern as in spec).
  • Storage objects must use tenant-namespaced paths; signed URLs short-lived.

Checklist (implementation)

  • Migration creates four tables with JSONB CHECK constraints and COMMENT ON COLUMN for mapping/error arrays as in spec.
  • Permission keys seeded + constants.ts entries for pf.import.*, pf.onboarding.manage.
  • RLS tests for all four tables; UPDATE policies use WITH CHECK.
  • User/admin guides linked from UI when docs/pf/data-import-guide.md and docs/pf/onboarding-admin-guide.md exist.