Technical-Functional Operations & Inter-Role Report

Exhaustive specification detailing cross-role operations across the 4 primary MentalHealthChange portals and auxiliary modules (Invoicing, FAQs, P2P Chat, Crisis Alerts, and GDPR Compliance).

👥
4 Core Roles
Admin, Company, Specialist, Client
🔄
12 Workflows
End-to-End Inter-Role Operations
🧩
6 Annexes
Invoices, FAQs, Chat, Crisis, Mail & GDPR
35+ APIs
Backend PHP JSON Endpoints

👥 Operational Functions by User Role

MentalHealthChange operates across 4 core user roles with Role-Based Access Control (RBAC) and privacy isolation. Below is the operational specification per actor:

Administrator / Clinical Lead ROLE_ADMIN
Global User Management
api/admin/admin_users.php
Full CRUD operations for clients, specialists, corporate HR reps, and administrative staff. Account status toggling (`is_active`).
SubRole & Permission Matrix
api/admin/subroles.php
Creation of fine-grained subroles (e.g. Clinical Lead) and assignment of qualified permissions (`PERM_ADMIN_CL_MESSAGES_READ`).
Corporate Invitation Generation
api/admin/company-invitation-create.php
Issuance of 32-character bulk registration security tokens for corporate client employees.
Crisis Alert Triage & Resolution
api/alerts/resolve.php
Real-time monitoring of critical risk alerts and logging resolution audit trails (`resolved_by`, `notes`).
Knowledge Base (FAQ) Management
api/admin/faq-manage.php
Creation, editing, and ordering of role-segmented help desk articles.
Employer (Company HR) ROLE_COMPANY
Workforce Wellbeing Dashboard
api/company/home.php
Consolidated overview of enrolled members, total session consumption, and active benefit budgets.
Aggregated Anonymous GDPR Reports
api/company/reports.php
Impact statistics with privacy protection threshold (≥ 10 active members to prevent individual tracking).
Billing & Corporate Allowances
api/company/billing.php
Statement history for `company_id` and employee quota management (`sessions_per_member`).
Direct Support Channel
api/company/contact.php
Direct dispatch of contract adjustment and quota expansion requests to administration.
Specialist (Provider / Coach) ROLE_PROVIDER
Agenda & Availability Settings
api/provider/availability-save.php
Definition of weekly working slots (`start_time`, `end_time`, `buffer_time`) and timezone settings.
Session Execution & 5-Metric Rating
api/provider/session-complete.php
Appointment completion with confidential progress notes and 5-dimension outcome rating.
Crisis Safety Care Plans
api/provider/safety-plan-save.php
Formulation of emergency contingency plans featuring coping strategies and medical contacts.
Clinical Assessment Supervision
api/provider/questionnaires.php
Review of PHQ-9, GAD-7, and WHO-5 scores for assigned client rosters.
Fee Invoice Submissions
api/provider/invoice-submit.php
Submission of completed session payout requests for direct bank settlement by administration.
Member (Client) ROLE_CLIENT
Self-Registration via Corporate Token
api/client/register.php
Account creation automatically bound to issuing employer invitation token.
Intake & Interest Focus
api/client/questionnaire-save-intake.php
Registration of initial assessment and wellness priorities (`client_interests`).
Appointment Rescheduling (24h Policy)
api/client/session-request-change.php
Rescheduling or cancellation requests calculating > 24h or < 24h notice.
Mental Health Psychometrics & Triage
api/client/questionnaire-save.php
Completion of PHQ-9/GAD-7 psychometric scales and 3-minute risk screening.
Encrypted Specialist Chat
api/messages.php
Bidirectional private messaging with assigned mental health specialist.