public async Task <IActionResult> GetHemoglobinObservationsForPatientAsync(string patientId) { Logger.LogDebug(nameof(GetHemoglobinObservationsForPatientAsync)); if (!ModelState.IsValid) { return(BadRequest()); } var response = await _observationService.GetHemoglobinObservationsForPatientAsync(patientId).ConfigureAwait(false); if (response == null) { return(NotFound(new NotFoundError("The observations for a patient was not found"))); } var result = _observationsToDtoConverter.Convert(response); return(Ok(result)); }