Overview
CL-14-EN-01 automates the generation of individual encounter records and charge entries from group session attendance. It extends the existingcl_group_session_documented event contract (CL-PM-GROUP-SESSIONS.md) with a batch review workflow and publishes cl_group_encounters_approved for downstream charge creation.
Ownership Boundaries
Key Principle: CL-14-EN-01 proposes CPT codes; PM-07 retains final authority for CPT/modifier/unit determination at charge capture. The
proposed_cpt_code is advisory and may be overridden by PM-07 fee schedule rules.
Event Contracts
Consumed Events
cl_group_session_documented (existing — defined in CL-PM-GROUP-SESSIONS.md)
- Publisher: CL-14
- Existing Subscriber: PM-07
- New Subscriber: CL-14-EN-01 (encounter generation handler)
- Purpose: Triggers creation of
cl_group_encounter_generationsrecords per present/partial attendee - Idempotency: Insert-once by
(organization_id, group_session_id, patient_id)usingON CONFLICT (organization_id, group_session_id, patient_id) DO NOTHING; replayed events are skipped and existing rows are not mutated.
Published Events
cl_group_encounters_approved (new — 📝 Planned)
- Publisher: CL-14-EN-01
- Subscriber: PM-07
- Channel:
cl_events - Payload Schema:
- Purpose: Triggers charge creation in PM-07 for approved encounter generations
- Trigger: Batch approval action in review UI (single or bulk)
Platform Integration Layer Usage
Data Flow
Cross-Core References
Security & Compliance
- RLS:
cl_group_encounter_generationshas RLS withpf_has_org_accessSECURITY DEFINER helper - 42 CFR Part 2: SUD group encounters inherit Part 2 protections; consent verification before display in batch review
- PHI Minimization: Generation tracking stores
patient_idreference only; no clinical content - Permission Keys:
cl.group-encounter-generation.view,.approve,.edit