feature: Simulator Scenarios + Clinical Validation: SOFA/GCS
This commit is contained in:
@@ -12,13 +12,11 @@ public class SofaController : ControllerBase
|
||||
|
||||
[HttpGet]
|
||||
[ProducesResponseType(typeof(ApiResponse<SofaScoreResponse>), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(typeof(ApiResponse<object>), StatusCodes.Status404NotFound)]
|
||||
public async Task<IActionResult> Current(Guid encounterId)
|
||||
{
|
||||
var score = await _sofa.GetCurrentAsync(encounterId);
|
||||
if (score is null)
|
||||
return NotFound(ApiResponse<object>.Fail(
|
||||
404, "No SOFA score computed for this encounter.", "NO_SOFA_SCORE"));
|
||||
return Ok(ApiResponse<SofaScoreResponse?>.Ok(null));
|
||||
|
||||
return Ok(ApiResponse<SofaScoreResponse>.Ok(MapResponse(score)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user