Run initial test for Climate Resilience Verification Suite
Add first part of Alert Quality Analytics
This commit is contained in:
@@ -53,7 +53,7 @@ public class AlertsController : ControllerBase
|
||||
[HttpPost("api/v1/alerts/{id:guid}/acknowledge")]
|
||||
public async Task<IActionResult> Acknowledge(Guid id, [FromBody] AcknowledgeAlertRequest req)
|
||||
{
|
||||
var clinicianId = User.Identity?.Name ?? "unknown";
|
||||
var clinicianId = req.ClinicianId ?? User.Identity?.Name ?? "unknown";
|
||||
var alert = await _alerts.AcknowledgeAsync(id, req, clinicianId);
|
||||
return Ok(ApiResponse<LocalClinicalAlert>.Ok(alert));
|
||||
}
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
public record AcknowledgeAlertRequest(string? Note);
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
public record AcknowledgeAlertRequest(
|
||||
[property: JsonPropertyName("note")] string? Note,
|
||||
[property: JsonPropertyName("clinicianId")] string? ClinicianId = null);
|
||||
|
||||
@@ -5,5 +5,6 @@ public class AcknowledgeAlertRequestValidator : AbstractValidator<AcknowledgeAle
|
||||
public AcknowledgeAlertRequestValidator()
|
||||
{
|
||||
RuleFor(x => x.Note).MaximumLength(1000).When(x => x.Note is not null);
|
||||
RuleFor(x => x.ClinicianId).MaximumLength(200).When(x => x.ClinicianId is not null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user