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: CL-49 Status: 📝 Spec — pre-verification (2026-05-09) Owner: CL

Touchpoints

CounterpartMechanismDirectionNotes
CL-02 (Assessment infra)Internal CL reuseReusesLOC assessments live in their own table (cl_loc_assessments) so dimension semantics stay pinned to instrument_version; CL-02 form components and validation patterns reused.
CL-08 (CDS)Event cl_loc_recommendation_changedPublishesCDS surfaces alert when direction != 'lateral'; payload UUID-only.
CL-43 (UM concurrent review)Events cl_loc_assessment_completed, cl_loc_override_recordedPublishesUM coordinator pulls full record server-side after a Part 2 consent re-check; cl_redisclosure_log entry written.
CL-11 (Consent / Part 2)cl_has_sud_consent(chart_id) SECURITY DEFINERReusesRLS gating on is_sud_related = true rows.
PF-70 (Code library)pf_*_codes lookupsConsumesrecommended_loc_code / final_loc_code validated against asam_loc_levels and locus_loc_levels.
PF-15 (Picklists)cl_loc_override_reasonsConsumesOverride reason enumeration. Seeded via pf_picklist_default_definitions.
PF-96 (Jurisdiction)pf_resolve_jurisdiction_profile(org, site)ConsumesLOCUS state thresholds and any state-specific ASAM expectations.
PF-30 (Permissions)useHasPermission / <PermissionGate>ConsumesKeys: cl.loc_assessment.{view,create,sign,override,report}.

Event payloads

Authoritative schemas: EVENT_CONTRACTS.md § CL-49. All payloads are UUID-only; never inline dimension_scores[*].notes or override_rationale (PHI).

Database references

  • Owns: cl_loc_assessments (chart-scoped via cl_patient_charts.id).
  • No cross-core FK (uses UUID columns only). Intra-CL FKs to cl_patient_charts are within-core and do not require ADR-002 coverage.

Disclosure / Part 2

UM (CL-43) consumption of SUD-flagged LOC assessments must be preceded by cl_has_sud_consent(chart_id) and a cl_redisclosure_log insert. Without consent, UM sees only LOC code + dimension severity bands — never notes, never override_rationale.

Status flip checklist (per Lovable project knowledge §2)

On completion, update all five surfaces:
  1. src/cores/cl/AGENTS.md — status + date
  2. specs/cl/tasks/CL-49-TASKS.md — header ✅
  3. docs/architecture/integrations/CROSS_CORE_INTEGRATIONS.md — row CL-49
  4. specs/cl/IMPLEMENTATION_LOG.md — entry
  5. specs/cl/specs/CL-49-automated-level-of-care-asam-locus.md — header