Spec: CL-49 Status: 📝 Spec — pre-verification (2026-05-09) Owner: CLDocumentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Touchpoints
| Counterpart | Mechanism | Direction | Notes |
|---|---|---|---|
| CL-02 (Assessment infra) | Internal CL reuse | Reuses | LOC 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_changed | Publishes | CDS surfaces alert when direction != 'lateral'; payload UUID-only. |
| CL-43 (UM concurrent review) | Events cl_loc_assessment_completed, cl_loc_override_recorded | Publishes | UM 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 DEFINER | Reuses | RLS gating on is_sud_related = true rows. |
| PF-70 (Code library) | pf_*_codes lookups | Consumes | recommended_loc_code / final_loc_code validated against asam_loc_levels and locus_loc_levels. |
| PF-15 (Picklists) | cl_loc_override_reasons | Consumes | Override reason enumeration. Seeded via pf_picklist_default_definitions. |
| PF-96 (Jurisdiction) | pf_resolve_jurisdiction_profile(org, site) | Consumes | LOCUS state thresholds and any state-specific ASAM expectations. |
| PF-30 (Permissions) | useHasPermission / <PermissionGate> | Consumes | Keys: cl.loc_assessment.{view,create,sign,override,report}. |
Event payloads
Authoritative schemas: EVENT_CONTRACTS.md § CL-49. All payloads are UUID-only; never inlinedimension_scores[*].notes or override_rationale (PHI).
Database references
- Owns:
cl_loc_assessments(chart-scoped viacl_patient_charts.id). - No cross-core FK (uses UUID columns only). Intra-CL FKs to
cl_patient_chartsare within-core and do not require ADR-002 coverage.
Disclosure / Part 2
UM (CL-43) consumption of SUD-flagged LOC assessments must be preceded bycl_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:src/cores/cl/AGENTS.md— status + datespecs/cl/tasks/CL-49-TASKS.md— header ✅docs/architecture/integrations/CROSS_CORE_INTEGRATIONS.md— row CL-49specs/cl/IMPLEMENTATION_LOG.md— entryspecs/cl/specs/CL-49-automated-level-of-care-asam-locus.md— header