public async Task <IActionResult> AddRedBloodCellCountObservationAsync([Required] string patientId, [Required] decimal value) { Logger.LogDebug(nameof(AddRedBloodCellCountObservationAsync)); if (ModelState.IsValid) { var response = await _observationService.AddRedBloodCellCountObservationAsync(patientId, value).ConfigureAwait(false); if (response == null) { return(NotFound(new NotFoundError("The observation was not created"))); } var result = _observationToDtoConverter.Convert(response); return(Ok(result)); } else { var errors = ModelStateErrors(); return(BadRequest(errors)); } }