using Microsoft.AspNetCore.Mvc; /// /// qSOFA scoring: current active criteria count per encounter (Redis-backed). /// [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; /// /// Returns the current qSOFA active criteria count (0–3) for an encounter. /// [HttpGet("current")] [ProducesResponseType(typeof(ApiResponse), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ApiResponse), StatusCodes.Status404NotFound)] public async Task Current(Guid encounterId) { var score = await _qsofa.GetCurrentAsync(encounterId); return Ok(ApiResponse.Ok(score)); } }