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: 📝 Partially Implemented (PM-38 trigger, PF-29 e-sign, PF-11 storage, PM-02/PM-10 prefill, CE-28/CE-29 handoff are Planned)
Spec: PM-40
Last Updated: 2026-04-09
Integration Pattern: Event (pm_appointment_created) + Platform (PF-29 e-sign, PF-11 documents) + Data (PM-02, PM-10)

Integration Overview

PM-40 generates and tracks digital pre-admission packets when intake appointments are created (PM-38), delivers secure links via CE messaging channels, captures e-signatures through PF-29, stores completed artifacts via PF-11, and surfaces status to coordinators in PM-10.

PM-38 → PM-40

Pattern: Event subscription (worker / Edge Function; no direct client INSERT on pm_preadmission_packets). Trigger: pm_appointment_created (see PM-38 event contract). Payload (illustrative):
FieldTypeNotes
organization_iduuidTenant
appointment_iduuidFK pm_appointments
patient_iduuidFK pm_patients
program_typetextMaps to pm_preadmission_form_templates
Outcome: Insert pm_preadmission_packets, send SMS/email with secure link, create PF-29 signature request for mandatory consent documents. Status: Planned

PM-40 → PF-29

Pattern: Platform API + event consumption. Calls: Prepare signature request for consent/privacy documents; embed returned signing URL in patient portal. Consumes: e_signature_completed (or equivalent PF-29 contract) to update pm_preadmission_packets.signed_at / status. Status: Planned

PM-40 → PF-11

Pattern: Document storage for signed PDFs or rendered form artifacts; link document_id on packet or completion record. Status: Planned

PM-40 ↔ PM-02 / PM-10

PM-02: Pre-fill insurance and eligibility-related questionnaire fields where policies exist. PM-10: Appointment detail shows packet status card; deep-links to read-only completed forms where permitted. Status: Planned

PM-40 ↔ CE-28 / CE-29

Pattern: Data read for questionnaire pre-fill (screening disposition, SOH fields) when lead/patient linkage exists; no direct CE imports in PM runtime — use platform/API contracts. Status: Planned

Security & Tenant Isolation

  • All reads/writes scoped by organization_id and enforced by RLS.
  • Secure links are opaque tokens; SMS copy minimizes PHI (see spec Security Considerations).

Event Contracts

The following events should be registered in EVENT_CONTRACTS.md:
EventPublisherConsumerStatus
pm_appointment_createdPM-38PM-40 (packet generation trigger)📝 Planned
e_signature_completedPF-29PM-40 (update packet status)📝 Planned
pm_preadmission_packet_completedPM-40PM-10 (appointment detail status)📝 Planned