/// <summary>
        /// Inserts a new record into the dbo.Paciente table.
        /// SQL+ Routine: dbo.PacienteInsert - Authored by IStrficek
        /// </summary>
        public PacienteInsertOutput PacienteInsert(IPacienteInsertInput input)
        {
            if (!input.IsValid())
            {
                throw new ArgumentException("PacienteInsertInput fails validation - use the PacienteInsertInput.IsValid() method prior to passing the input argument to the PacienteInsert method.", "input");
            }

            PacienteInsertOutput output = new PacienteInsertOutput();

            if (sqlConnection != null)
            {
                using (SqlCommand cmd = GetPacienteInsertCommand(sqlConnection, input))
                {
                    cmd.Transaction = sqlTransaction;
                    PacienteInsertCommand(cmd, output);
                }
                return(output);
            }
            for (int idx = 0; idx <= retryOptions.RetryIntervals.Count; idx++)
            {
                if (idx > 0)
                {
                    System.Threading.Thread.Sleep(retryOptions.RetryIntervals[idx - 1]);
                }
                try
                {
                    using (SqlConnection cnn = new SqlConnection(connectionString))
                        using (SqlCommand cmd = GetPacienteInsertCommand(cnn, input))
                        {
                            cnn.Open();
                            PacienteInsertCommand(cmd, output);
                            cnn.Close();
                        }
                    break;
                }
                catch (SqlException sqlException)
                {
                    bool throwException = true;

                    if (retryOptions.TransientErrorNumbers.Contains(sqlException.Number))
                    {
                        throwException = (idx == retryOptions.RetryIntervals.Count);

                        if (retryOptions.Logger != null)
                        {
                            retryOptions.Logger.Log(sqlException);
                        }
                    }
                    if (throwException)
                    {
                        throw;
                    }
                }
            }
            return(output);
        }