Version: 1.0.0Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Last Updated: 2026-03-20
Spec: RH-04 Participation & Attendance
Constitution Reference: Section 1.2 (Core Independence), Section 1.3 (Integration Patterns)
Overview
RH-04 manages resident participation tracking, attendance recording, and curfew compliance. It publishes events for attendance threshold breaches and integrates with RH-05 (Discharge Planning) and PF-10 (Notifications).Integration Points
Platform Foundation (PF) Dependencies
Required PF Features:- PF-08 (Forms Integration): Excused absence request forms
- PF-10 (Notifications): Attendance warnings, curfew violation alerts
RBAC Dependencies (PF-02)
RH-04 requires these RH-specific roles in the platform RBAC system:rh_housing_tech: Record attendance, assign chores, schedule transport, record curfew checksrh_house_manager: Approve excused absences, view participation metrics, manage daily operationsrh_program_manager: View all participation data, generate compliance reports, access program-level metrics
rh_has_role() SECURITY DEFINER function.
Consumer Core Dependencies (Downstream)
Internal RH Features:- RH-01 (Episodes): Episode records required for attendance tracking
- RH-02 (Phases): Phase data required for curfew time validation
- RH-03 (Significant Events): Curfew violations can trigger significant events
- RH-05 (Discharge Planning): Attendance non-compliance flags linked to discharge planning
Event Contracts
Event: rh_attendance_threshold_breached
Publisher: RH (RH-04)Subscribers: RH-05 (Discharge Planning), PF-10 (Notifications)
Status: 📝 Planned Purpose: Trigger discharge planning, send attendance warnings Payload Schema:
Platform Integration Layer Usage
Consumes:- PF-08 (Forms Integration): Excused absence request forms via
@/platform/forms - PF-10 (Notifications): Attendance warnings, curfew violation alerts via
@/platform/notifications
Security Considerations
Multi-Tenancy
- ✅ RLS Enforcement: All
rh_attendance_*andrh_participation_*tables filtered byorganization_idvia RLS policies
Role-Based Access Control
- ✅ RH Housing Tech: Record attendance, assign chores, schedule transport, record curfew checks
- ✅ RH House Manager: Approve excused absences, view participation metrics, manage daily operations
- ✅ RH Program Manager: View all participation data, generate compliance reports, access program-level metrics
Data Protection
- ✅ PII Handling: Attendance and participation data may contain resident information; access controlled via RLS
- ✅ Audit Trail: All attendance and participation changes logged via PF-04
Testing Requirements
- Event payload structure validation
- Event fires on trigger condition (attendance threshold breach)
- Correct
organization_idincluded in all events - Subscribers handle events correctly (RH-05, PF-10)
- RLS policies enforce org isolation on attendance and participation queries
- RBAC roles work correctly for different user types