public async Task <IActionResult> ConsultasPorPaciente(string nomePaciente) { try { if (string.IsNullOrEmpty(nomePaciente)) { return(View(RedirectToAction(nameof(Index)))); } List <Consulta> listaConsultasPorPaciente = await _consultaService.FiltraConsultasPorPacienteByNomeAsync(nomePaciente); return(View(listaConsultasPorPaciente)); } catch (Exception ex) { throw ex; } }