Skip to main content
Version: 1.1.1 Last Updated: 2026-05-31 Status: ✅ Reviewed (pre-implementation); column names reconciled to as-shipped schema 2026-05-31 (issue #548) Constitution Reference: Section 1.2 (Core Independence), Section 1.3 (Integration Patterns) Source: CL-PM-SPEC-REVIEW Finding 5.3, Pre-Implementation Review 2026-02-22

Overview

Telehealth workflows span CL and PM with overlapping data. This contract defines which core owns which data and how they integrate without direct cross-core dependencies.

Ownership Boundaries


Integration Flow


Telehealth Fields by Core

PM-13: pm_telehealth_sessions (Operations)

Column names below mirror the live schema in src/integrations/supabase/types.ts (reconciled 2026-05-31, issue #548).

CL-04: cl_progress_notes (Clinical Documentation)

PM-07: Charge Capture Logic (Billing)

Modifier auto-application rules based on clinical_note_finalized event payload:

Events

PM-13 Events (New)

telehealth_session_started

Published when pm_telehealth_sessions.session_status transitions to 'active'.

telehealth_session_completed

Published when pm_telehealth_sessions.session_status transitions to 'completed'.

Existing Event: clinical_note_finalized (CL-04 → PM-07)

The clinical_note_finalized event (defined in CL-PM-ENCOUNTER-TO-BILLING.md) includes telehealth fields:
PM-07 uses these to determine modifiers and POS without querying CL tables directly.

pm_appointments.telehealth_url Deprecation

PM-03 Phase 1 stores a manual telehealth_url TEXT on pm_appointments. Once PM-13 is active for an organization:
  • Write path: Join links are generated into pm_telehealth_sessions.session_url via the edge function.
  • Read path: UI should prefer pm_telehealth_sessions.session_url when a linked session exists; fall back to pm_appointments.telehealth_url for appointments without a PM-13 session.
  • Migration path: No data migration needed. The telehealth_url column remains for orgs not using PM-13.
  • Sunset date: The telehealth_url column on pm_appointments will be deprecated once all organizations are migrated to PM-13. Target sunset: 2026-Q4. After sunset, the column will be dropped in a future migration.
  • Warning mechanism: Type accessors that expose pm_appointments.telehealth_url MUST include /** @deprecated Use pm_telehealth_sessions.session_url instead. Sunset: 2026-Q4. */ JSDoc annotations. Runtime access without a linked PM-13 session should emit a structured warning (deprecated_column_access: telehealth_url) to support migration tracking.

Event Registration

The following events should be registered in fw_workflow_events for automation support: Register in EVENT_CONTRACTS.md under PM-13 section when implemented.

Clinical compliance layer (CL-24)

Scope: Per-patient telehealth consent (annual, audit-immutable), pre-session safety checklist, per-session compliance record (jurisdiction, modality, connectivity), daily expiry cron, and cl_telehealth_session_safety_completed signal back to PM-13. Contract: CL-24 Integration Contract Important: CL-24 does NOT publish modifier data. PM-07 continues to read is_telehealth, telehealth_modality, patient_location, and provider_location from CL-04’s clinical_note_finalized event — that pathway is unchanged by CL-24. CL-24 is a clinical compliance wrapper around the PM-13 vendor session, not a substitute for the CL-04 → PM-07 billing-data flow defined above. CL-24 surfaces in the PM-13 surface through @/platform/clinical/telehealth/ exports (e.g., TelehealthConsentBadge, useTelehealthSessionsByPmIds); PM-13 never imports from @/cores/cl/*.

Cross-Reference