Feature ID: CL-07-EN-01Documentation 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: π Planned
Spec Reference:
specs/cl/specs/CL-07-EN-01-zero-suicide-framework.mdLast Updated: 2026-04-10
Overview
CL-07-EN-01 extends CL-07 with structured lethal means assessment capture, safety plan sharing with consent controls, and automated high-risk follow-up scheduling. This enhancement integrates with platform scheduling, notifications, and clinical context layers while preserving CL ownership boundaries.Integration Points
| Dependency | Pattern | Purpose |
|---|---|---|
| PF-01 Organizations & Sites | Direct dependency | Tenant/site scope for all created records and operations |
| PF-10 Notifications | Platform Integration Layer | Notify clinicians/support network for safety-plan sharing (signed URL in action_url) and follow-up milestones |
| PM-03 Scheduling | Platform Integration Layer (@/platform/scheduling) | Create 24/48/72 follow-up encounters without direct CL->PM imports |
| PF-96 Jurisdiction Profiles | Platform Integration Layer | Support jurisdiction-specific policy parameters without hardcoded state constants |
| CL-11 Consent Management | Platform Clinical Layer (@/platform/clinical) | useConsentCheck(chartId, 'safety_plan_share') β cl_check_sud_consent RPC for Part 2 consent gating before share |
| Supabase Storage | Direct (edge function) | 24h signed URLs; share-row gate + audit (see below) |
Storage / signed URL policy
- Bucket:
cl-safety-plan-shares. TTL:createSignedUrl(..., 86400)(24h). - Before issuing or returning a signed URL: require
cl_safety_plan_shares.status === 'active'; rejectrevoked/expired. Persist revocation asstatus = 'revoked'. - Log each fetch: share row id, user id, timestamp, client IP, outcome (allow/deny).
Event and API Contracts
Planned Events
-
cl_safety_plan_shared- Publisher: CL
- Subscribers: PF-10 notifications, workflow listeners
- Payload (minimum):
organization_id,patient_id,safety_plan_id,shared_by,shared_at
-
cl_zero_suicide_followup_scheduled- Publisher: CL
- Subscribers: PM scheduling views, PF-10 reminders
- Payload (minimum):
organization_id,patient_id,followup_type,scheduled_for,encounter_id
API Surface (planned)
createSafetyPlanShare(...)β consent viacl_check_sud_consent; PDF to Storage; signed URL (24h TTL); insertcl_safety_plan_shares(status = active,expires_ataligned); PF-10action_url= URLscheduleZeroSuicideFollowups(chartId, riskLevel)β creates 24/48/72h follow-up appointment requests via@/platform/schedulingwhen riskLevel is βhighβ or βimminentβ
Security and Compliance Notes
- Enforce tenant isolation via
organization_idand RLS on new CL tables. - Enforce consent-aware sharing logic for SUD/Part 2-sensitive content.
- Log only identifiers in integration payloads; avoid PHI-rich payload structures.
Related Documentation
docs/architecture/integrations/CL-07-suicide-risk-screening-safety-planning-INTEGRATION.mddocs/architecture/integrations/CROSS_CORE_INTEGRATIONS.mddocs/architecture/integrations/EVENT_CONTRACTS.mddocs/architecture/integrations/API_CONTRACTS.md