Process Quick Survey
Submit a quick employee wellness survey that evaluates mood, workload, team support, and job satisfaction. The system automatically calculates risk scores, awards gamification points, and generates alerts when high-risk patterns are detected.Employees earn 5 points for completing each survey. Completing surveys builds streaks and unlocks badges.
Authentication
Requires authentication via JWT token in the Authorization header.Request Body
The unique identifier of the employee completing the survey
Survey responses object containing wellness metrics
Request Example
Response
Indicates if the request was successful
Response message
Response data object
Response Example
Risk Score Calculation
The risk score is calculated using a weighted formula that considers multiple factors:Weighting System
- Mood (30%): Emotional state impacts overall wellbeing
- Workload (25%): High workload is a primary burnout indicator
- Team Support (20%): Social support buffers against stress
- Job Satisfaction (25%): Overall job satisfaction
Adjustment Factors
Risk scores are adjusted based on employee characteristics indiagnosticService.js:206-239:
- Tenure: New employees (less than 6 months) have 1.2x risk multiplier
- Department: High-stress departments (ER, ICU) add 1.15x multiplier
- Shift: Night shift workers have 1.1x multiplier
- History: Employees with recent high-risk surveys get 1.2x multiplier
Risk Levels
- Bajo (Low): Risk score < 30
- Medio (Medium): Risk score 30-69
- Alto (High): Risk score ≥ 70
Automated Actions
When a survey is processed, the system automatically:- Updates Employee Metrics - Refreshes
wellnessMetricson the employee record - Awards Gamification Points - Adds 5 points and updates streaks/levels
- Checks for Badges - Awards badges for participation streaks (7, 10, 15, 30 days)
- Performs AI Analysis - If
freeTextis provided, Claude analyzes sentiment and generates recommendations - Generates Alerts - Creates SmartAlerts for high-risk employees or concerning patterns
AI Sentiment Analysis
When free text is provided, Claude (Sonnet 3) analyzes the comment to extract:- Sentiment classification (very positive to very negative)
- Emotional score (-1 to 1)
- Risk indicators and keywords
- Turnover risk score (0-100)
- Personalized recommendations with priority levels
diagnosticService.js:62-150.
Related Endpoints
- Wellness Heatmap - View department-level wellness trends
- Smart Alerts - Manage alerts generated from survey responses