Exemple #1
0
        public IActionResult AtualizarNomeCpfPaciente([FromBody] AtualizarNomeCpfPacienteViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest("Erro! View Model invalida"));
            }

            try
            {
                var result = _pacienteAppService.AtualizarNomeCpfPaciente(viewModel);

                return(Ok(new ResponseHelper("Paciente cadastrado com sucesso", true, result)));
            }
            catch (Exception e)
            {
                return(BadRequest(new ResponseHelper(e.Message, false, e)));
            }
        }