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.

Feature ID: CL-18
Status: ✅ Implemented
Spec Reference: CL-18-sdoh-screening-social-needs.md
Last Updated: 2026-02-23
Last Verified: 2026-02-23

Overview

CL-18 adds SDOH screening (e.g. PRAPARE, AHC-HRSN), social needs tracking, community resource referrals, and ICD-10-CM Z-code (Z55–Z65) documentation. Integration is via patient chart (CL-01), comprehensive assessment (CL-02), PF-70 code library, and an optional event for analytics/workflow.

Integration Points (from Spec)

DependencyPatternPurpose
PF-01 (Organizations & Sites)DirectMulti-tenant isolation
PF-02 (RBAC)DirectRole-based access; permission keys (PF-30)
PF-08 (Profiles)Directscreened_by, referred_by, audit columns
PF-70 (Medical Terminology)PlatformICD-10-CM Z55–Z65 for SDOH documentation
CL-01 (Patient Chart)InternalSDOH screenings and referrals visible on chart; Z-codes on problem list
CL-02 (Comprehensive Assessments)InternalSDOH element may link to or trigger standalone screening

API / Data Contracts

  • Screenings: cl_sdoh_screenings (chart_id, instrument, screened_at, screened_by, responses JSONB, needs_identified[], custom_fields). No public REST API; access via Supabase client and RLS.
  • Referrals: cl_social_referrals (chart_id, screening_id, resource_name, resource_type, need_category, status, referred_at, referred_by, outcome_notes, outcome_at, custom_fields). Same access pattern.
  • Z-codes: PF-70 code library provides type-ahead and validation for Z55–Z65; link from screening or problem list (CL-01).

Event Contracts

  • Published (optional): cl_sdoh_screening_completed — for analytics/workflow.
Payload (final schema in EVENT_CONTRACTS.md when implemented):
FieldTypeSource / Notes
event_idUUIDUnique event instance
screening_idUUIDcl_sdoh_screenings.id
chart_idUUIDcl_sdoh_screenings.chart_id (primary reference; consumers resolve patient via cl_patient_charts)
organization_idUUIDTenant context
needs_identifiedTEXT[]Copy of cl_sdoh_screenings.needs_identified at event time
screened_atTIMESTAMPTZOptional; for event ordering
Consumers MUST resolve patient identity from chart_id; patient_id is not in the payload (see EVENT_CONTRACTS.md).
  • Consumed: None for MVP.

Security and RLS

  • Tables: cl_sdoh_screenings, cl_social_referrals — RLS enabled; org-scoped via SECURITY DEFINER helpers; UPDATE policies with WITH CHECK per constitution §5.2.4.
  • PHI: Screening responses and referral data are PHI; no PHI in logs or external AI.
  • Permissions: cl.sdoh_screenings.view / .create, cl.social_referrals.view / .create / .update; seed via migration (PF-30).