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.

Spec: specs/cl/specs/CL-48-clinical-document-architecture-cda.md
Status: 📝 Stub — expand after Phase 1
Created: 2026-05-10

Integration Points

Platform Foundation

PF SpecIntegration TypeWhat CL-48 Uses
PF-01Direct dependencyOrganization context for tenant isolation
PF-10Platform Integration LayerTransmission failure/delivery notifications
PF-11Platform Integration LayerCDA XML archival in pf-documents bucket
PF-30Direct dependencyPermission-gated access (cl.cda.*)

CL Internal

CL SpecRelationshipDetail
CL-11ConsumerPart 2 consent enforcement via cl_has_sud_consent(chart_id)
CL-45ConsumerReuses buildCcdaAllergySection() and generateRedisclosureNotice()
CL-20PeerShared clinical data assembly patterns (PDF export vs XML generation)
CL-16Extends (C-CDA generation carve-out)Logs transmissions to cl_data_exchange_log; C-CDA ingestion remains with CL-16

Event Contracts

Published Events

Event NamePayloadSubscribersStatus
cl_cda_document_generated{ document_id, patient_id, document_type, contains_part2_data, organization_id }CL-25 Audit Dashboard📝 Planned
cl_cda_transmission_status_changed{ document_id, old_status, new_status, recipient_endpoint_id, organization_id }PF-10 Notifications📝 Planned

Consumed Events

None — CL-48 does not consume events from other specs.

API / Edge Function Contracts

transmit-cda-document (Edge Function)

  • Method: POST
  • Auth: Service-role or authenticated user with cl.cda.transmit
  • Request: { document_id: string }
  • Response: { success: boolean, status: string, error?: string }
  • HISP Adapter: Abstracted behind interface for testability; mock mode available.

Pending Items

  • Expand event contract details after Phase 1
  • Document HISP adapter interface after Phase 3
  • Update CROSS_CORE_INTEGRATIONS.md row from placeholder to full contract

Last Updated: 2026-05-10