Core: CL
Status: ✅ Complete
Last Updated: 2026-04-03
Summary
CL-02-EN-60 replaces Arizona-specific intake assessment requirement checks with jurisdiction-profile-driven logic while preserving Arizona baseline behavior. This includes renaming TypeScript constants (AHCCCS_SECTION_CODES → INTAKE_SECTION_CODES), creating a generic SQL function (cl_check_intake_elements), and wiring UI components to read required elements from PF-96 jurisdiction profiles.
Integration Pattern
- Pattern: Platform dependency through PF-96 jurisdiction profiles.
- CL consumes
useClinicalRules()from@/platform/jurisdiction(convenience hook overuseJurisdictionProfile). - No direct core-to-core imports.
- No new external API contracts.
- No new events published or consumed.
Upstream Dependencies
Downstream Consumers
Data Changes
Security Notes
- Organization-scoped profile resolution required for all lookups.
cl_check_intake_elementsusesSECURITY DEFINERwithSET search_path = public.- Existing RLS and tenant isolation patterns remain in force on
cl_intake_assessments. - No PHI is transmitted to AI systems for profile resolution.
- Profile data is non-PHI (jurisdiction configuration metadata only).
Events and APIs
- Events published: None.
- Events consumed: None.
- API contracts changed: Yes —
cl_check_intake_elementsandcl_check_ahcccs_18_elementsRPCs added/updated. - RPC functions added:
cl_check_intake_elements(UUID, JSONB)— Generic intake element completeness checker (see API_CONTRACTS.md)cl_check_ahcccs_18_elements(UUID)— Legacy wrapper (DEPRECATED); updated to call generic function
- API_CONTRACTS.md — CL-02-EN-60 RPC contract for detailed contract specification
- PLATFORM_INTEGRATION_LAYERS.md — PF-96 for jurisdiction profile integration layer
- EVENT_CONTRACTS.md for event patterns
Validation Checklist
- Arizona 18-element parity verified (legacy wrapper output matches generic function with AZ fixture).
- At least one non-Arizona profile test fixture verified.
- Existing CL-02 and CL-40 regression suites pass.
-
rg 'AHCCCS_SECTION_CODES' src/returns zero results (excluding deprecated alias). -
npm run validatepasses clean. - Profile lookup adds <50ms to form load p95.