Run initial test for Climate Resilience Verification Suite

Add first part of Alert Quality Analytics
This commit is contained in:
voltsrage
2026-06-24 03:01:00 +08:00
parent 032cd1d240
commit 185dc93fa1
50 changed files with 4116 additions and 55 deletions
@@ -173,4 +173,30 @@ public class AlertsController : ControllerBase
var alert = await _alerts.ResolveAsync(id);
return Ok(ApiResponse<ClinicalAlert>.Ok(alert));
}
/// <summary>
/// Submits clinician feedback for an acknowledged or resolved alert.
/// One submission per user per alert.
/// </summary>
[HttpPost("api/v1/alerts/{id:guid}/feedback")]
[AuthorizePermission(ClinicalPermissions.AlertsFeedback)]
[ProducesResponseType(typeof(ApiResponse<object>), StatusCodes.Status201Created)]
[ProducesResponseType(typeof(ApiResponse<object>), StatusCodes.Status400BadRequest)]
[ProducesResponseType(typeof(ApiResponse<object>), StatusCodes.Status404NotFound)]
[ProducesResponseType(typeof(ApiResponse<object>), StatusCodes.Status409Conflict)]
public async Task<IActionResult> SubmitFeedback(
Guid id, [FromBody] SubmitAlertFeedbackRequest req)
{
var feedback = await _alerts.SubmitFeedbackAsync(id, req.FeedbackType, req.Comment);
return Created(
$"/api/v1/alerts/{id}/feedback/{feedback.Id}",
ApiResponse<object>.Ok(new
{
id = feedback.Id,
alertId = feedback.AlertId,
feedbackType = feedback.FeedbackType.ToString(),
comment = feedback.Comment,
createdAt = feedback.CreatedAt
}));
}
}