@* Views/Admin/SurveyAnalysis/ViewHighRiskResponse.cshtml *@ @model List @{ var response = ViewBag.Response as Model.Response; ViewData["Title"] = $"High Risk Case — Response #{response?.Id}"; } @section Styles { }
@* ===== CRITICAL ALERT ===== *@ @if (Model.Any(r => r.RiskAssessment?.RequiresImmediateAttention == true)) {
IMMEDIATE ATTENTION REQUIRED

This employee's responses indicate significant mental health concerns that require urgent professional intervention.

HIGH PRIORITY PROFESSIONAL INTERVENTION CONFIDENTIAL
} @* ===== OVERVIEW + CHECKLIST ===== *@ @if (response != null) {

Employee Response Overview

Anonymized case information

Response ID
#@response.Id
Submission Date
@response.SubmissionDate.ToString("MMMM dd, yyyy")
Survey
@response.Questionnaire?.Title
Privacy Notice
All personal information has been anonymized to protect employee privacy while enabling professional mental health assessment.

Action Checklist

Track intervention steps

} @* ═══════════════════════════════════════════ CASE MANAGEMENT PANELS — TOP POSITION ═══════════════════════════════════════════ *@

CASE STATUS TRACKING

Track intervention workflow from detection to resolution

Loading status...

ACTION PLANS

Schedule interventions, contacts, and follow-ups

Loading action plans...

CASE NOTES

Confidential notes for case management and documentation

Loading notes...

RESPONDENT HISTORY

All responses from this individual across questionnaires

Loading history...
@* ═══════════════════════════════════════════ AI ANALYSIS CARDS ═══════════════════════════════════════════ *@ @if (Model != null && Model.Any()) { @foreach (var analysis in Model.OrderByDescending(a => a.RiskAssessment?.RiskScore ?? 0)) { var riskLevel = analysis.RiskAssessment?.RiskLevel ?? Services.AIViewModel.RiskLevel.Low; var riskScore = analysis.RiskAssessment?.RiskScore ?? 0; var riskClass = riskLevel.ToString().ToLower();

Question Analysis

@analysis.QuestionText

@riskLevel RISK
@Math.Round(riskScore * 100, 0)% SCORE
Employee Response (Anonymized)
@analysis.AnonymizedResponseText
@if (analysis.SentimentAnalysis != null) {
Emotional Sentiment
Positive@Math.Round(analysis.SentimentAnalysis.PositiveScore * 100, 1)%
Neutral@Math.Round(analysis.SentimentAnalysis.NeutralScore * 100, 1)%
Negative@Math.Round(analysis.SentimentAnalysis.NegativeScore * 100, 1)%
}
Mental Health Risk Assessment
@if (analysis.RiskAssessment?.RiskIndicators?.Any() == true) {
Risk Indicators
@foreach (var ind in analysis.RiskAssessment.RiskIndicators){ @ind}
} @if (!string.IsNullOrEmpty(analysis.RiskAssessment?.RecommendedAction)) {
Recommended Action

@analysis.RiskAssessment.RecommendedAction

} @if (analysis.RiskAssessment?.ProtectiveFactors?.Any() == true) {
Protective Factors
@foreach (var f in analysis.RiskAssessment.ProtectiveFactors){ @f}
} @if (analysis.KeyPhrases?.KeyPhrases?.Any() == true) {
Key Phrases
@foreach (var p in analysis.KeyPhrases.KeyPhrases.Take(6)){@p}
}
@if (analysis.Insights?.Any() == true) {

Workplace Intervention Recommendations

@foreach (var insight in analysis.Insights) {
@insight.CategoryP@insight.Priority
@insight.Issue
@insight.RecommendedIntervention
}
}
} } @* ===== PROFESSIONAL ACTION PLAN (static) ===== *@

Mental Health Professional Action Plan

Immediate Actions
Next 24 Hours
  • Contact employee for confidential check-in
  • Assess immediate safety and support needs
  • Provide mental health resources and contacts
  • Document initial intervention in confidential records
Follow-up Actions
Next 7 Days
  • Schedule follow-up conversation
  • Review workplace factors with management
  • Implement recommended workplace interventions
  • Assess progress and adjust support plan
@functions { private string GetRiskIcon(Services.AIViewModel.RiskLevel riskLevel) { return riskLevel switch { Services.AIViewModel.RiskLevel.Critical => "fa-skull-crossbones", Services.AIViewModel.RiskLevel.High => "fa-triangle-exclamation", Services.AIViewModel.RiskLevel.Moderate => "fa-circle-exclamation", _ => "fa-circle-check" }; } } @section Scripts { }