> ## 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.

# Digital Pre-Admission Packet & E-Signatures — Integration Document

> Status: \U0001F4DD Partially Implemented (PM-38 trigger, PF-29 e-sign, PF-11 storage, PM-02/PM-10 prefill, CE-28/CE-29 handoff are Planned) Last Updated: 2…

**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](../../../specs/pm/specs/PM-40-digital-preadmission-packet-esignatures.md)\
**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):**

| Field             | Type | Notes                                    |
| ----------------- | ---- | ---------------------------------------- |
| `organization_id` | uuid | Tenant                                   |
| `appointment_id`  | uuid | FK `pm_appointments`                     |
| `patient_id`      | uuid | FK `pm_patients`                         |
| `program_type`    | text | Maps 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](./EVENT_CONTRACTS.md):

| Event                              | Publisher | Consumer                          | Status     |
| ---------------------------------- | --------- | --------------------------------- | ---------- |
| `pm_appointment_created`           | PM-38     | PM-40 (packet generation trigger) | 📝 Planned |
| `e_signature_completed`            | PF-29     | PM-40 (update packet status)      | 📝 Planned |
| `pm_preadmission_packet_completed` | PM-40     | PM-10 (appointment detail status) | 📝 Planned |

***

## Related

* [CROSS\_CORE\_INTEGRATIONS.md](./CROSS_CORE_INTEGRATIONS.md) — matrix entry for PM-38 → PM-40 (when added).
* [EVENT\_CONTRACTS.md](./EVENT_CONTRACTS.md) — `pm_appointment_created`, PF-29 signature events.
