Status: ✅ Implemented
Spec Reference: PF-71-patient-identity-boundary.md
Last Updated: 2026-02-18
Overview
PF-71 defines the patient identity boundary so CL and PM do not depend on each other. A single PF-owned tablepf_patient_identities holds minimal identity (id, organization_id, mrn); PM-01 and CL-01 reference it via FKs. Demographics remain in PM-01; chart and clinical data reference identity only.
Integration Points (from Spec)
Data Contract
- Table:
pf_patient_identities(id, organization_id, mrn, created_at, updated_at, created_by, updated_by). UNIQUE(organization_id, mrn). - RLS: Org-scoped via
pf_has_org_access(organization_id, auth.uid()); SELECT/INSERT/UPDATE/DELETE with USING and WITH CHECK. - PM-01: Adds
pm_patients.patient_identity_id(FK + index) in PM-01 migration; owns create-or-link logic on registration. - CL-01: Uses
cl_patient_charts.patient_idREFERENCESpf_patient_identities(id)(already in CL-01 spec); no direct PM dependency.
Related Docs
- CROSS_CORE_INTEGRATIONS.md — PF-71 row (patient identity boundary)
- PM-01-patient-registration-demographics-INTEGRATION.md — Identity creation/link
- CL-01-patient-chart-clinical-summary-INTEGRATION.md — Chart ↔ identity