I recently ran across the following result in a paper of [Ash-Brakenhoff-Zarrabi][1] (Lemma 3.1), where it is called Dedekind's criterion:
Let $T(x)$ be a monic irreducible polynomial with root $\theta$ and let $K = \mathbb{Q}(\theta)$. Let $\mathcal{O}$ be the ring of integers in $K$ and let $p$ be a prime. We use overlines to denote reduction modulo $p$.
Factor $\bar{T}(x)$ in $\mathbb{F}_p[x]$ as $\prod \bar{t}_i(x)^{e_i}$, and choose lifts of the $\bar{t}_i$ to monic polynomials in $\mathbb{Z}[x]$. Define $g(x) = \prod t_i(x)$, $h(x)=\prod t_i(x)^{e_i-1}$ and $f(x) = (T(x) - g(x) h(x))/p$. Then $p$ divides the index of $\mathbb{Z}[\theta]$ in $\mathcal{O}$ if and only if $GCD(\bar{f}, \bar{g}, \bar{h})$ is not $1$.
$\hspace{1cm}$
[1] A. Ash, J. Brakenhoff, and T. Zarrabi, Equality of Polynomial and Field DiscriminantsEquality of Polynomial and Field Discriminants, Experiment. Math. 16 (2007), 367–374