Skip to main content
Version: 1.0.0
Last Updated: 2026-02-23
Status: ✅ Implemented
Last Verified: 2026-02-23 Spec: PM-16-patient-statement-generation-billing-communications

Overview

PM-16 adds statement cycle orchestration, multichannel delivery (print/email/portal), payment plans, and financial assistance workflow. It depends on PF and same-core PM features only; no cross-core imports.

Quick Reference


Integration Matrix

Cross-Core Summary (CROSS_CORE_INTEGRATIONS.md)

This row matches the central matrix format for alignment with CROSS_CORE_INTEGRATIONS.md:

Contract: Platform Foundation

PF-01 (Organizations & Sites)

  • Usage: Tenant context (organization_id, optional site_id) on all PM-16 tables; RLS and app-level filtering.
  • Contract: Standard multi-tenant pattern; no custom API.

PF-02 / PF-30 (Permissions)

  • Usage: Permission keys pm.statements.*, pm.payment_plans.*, pm.financial_assistance.* for UI and actions.
  • Contract: Keys defined in spec; seeded in migration; checks via pf_has_permission().

PF-10 (Notifications)

  • Usage: Email delivery of statements / billing communications.
  • Contract: Use @/platform/notifications (Platform Integration Layer). Payload and template TBD in implementation.

PF-11 (Documents)

  • Usage: Statement PDF generation and storage; portal and print consumption.
  • Contract: Use @/platform/documents (Platform Integration Layer). Document type and metadata TBD in implementation.

Contract: Same-Core (PM)

PM-09 (Payments & statement table)

  • Usage: Payment artifacts and existing statement table; payments update balances and statuses used by PM-16.
  • Contract: Direct table access within PM; align statement run and delivery tables with PM-09 data model.

PM-12 (Patient portal)

  • Usage: Portal posting of statements; patient-facing billing view.
  • Contract: Direct PM hooks/queries; statement visibility and download via portal scope (patient + org).

Event Contracts

No cross-core events required for PM-16. Internal events (e.g., statement_run_completed, delivery_attempt_recorded) may be added for audit or workflow; document in EVENT_CONTRACTS.md if added.

API Contracts

No public cross-core APIs. Internal PM hooks and edge functions (e.g., statement generation, delivery trigger) to be documented in implementation tasks.

Security & Tenant Isolation

  • All PM-16 data scoped by organization_id; RLS and app-level filter on every mutation.
  • PHI: statement and payment-plan data; no PHI in logs; access via RLS and permission keys only.
  • Integration with PF-10/PF-11: no PHI in notification payloads; use system-generated UUIDs only (e.g. patient_id, statement_id, organization_id); resolve display names and account details via authorized API calls in the UI; document the retrieval pattern in implementation. Must not include in payloads: patient names, MRNs, DOBs, account numbers. Acceptable: patient UUID, statement ID, organization ID.

Open Items

  • Finalize statement PDF format and storage location (PF-11).
  • Define email template and notification payload for statement delivery (PF-10).
  • Confirm PM-09 table names and columns for statement/balance linkage.
  • Add CROSS_CORE_INTEGRATIONS.md row if any cross-core integration is added later.