update docs and prep for frontend

This commit is contained in:
voltsrage
2026-06-19 15:44:58 +08:00
parent abc781c9c0
commit 49973271e5
20 changed files with 1071 additions and 26 deletions
@@ -0,0 +1,26 @@
using Microsoft.AspNetCore.Mvc;
/// <summary>
/// qSOFA scoring: current active criteria count per encounter (Redis-backed).
/// </summary>
[ApiController]
[Route("api/v1/encounters/{encounterId:guid}/qsofa")]
[Produces("application/json")]
public class QsofaController : ControllerBase
{
private readonly IQsofaService _qsofa;
public QsofaController(IQsofaService qsofa) => _qsofa = qsofa;
/// <summary>
/// Returns the current qSOFA active criteria count (03) for an encounter.
/// </summary>
[HttpGet("current")]
[ProducesResponseType(typeof(ApiResponse<QsofaCurrentResponse>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ApiResponse<object>), StatusCodes.Status404NotFound)]
public async Task<IActionResult> Current(Guid encounterId)
{
var score = await _qsofa.GetCurrentAsync(encounterId);
return Ok(ApiResponse<QsofaCurrentResponse>.Ok(score));
}
}