Given prime numbers $p_1, \cdots, p_n$, Define $E:= \mathbb{Q} [\sqrt{p_1}, \cdots, \sqrt{p_n}]$ a Galois extension over $\mathbb{Q}$ with the separable polynomial $$p(x) = \prod(x^2-p_i).$$
I know in general, permuting roots does not always give us a Galois group element.
In this case, if I have the permutation $\sqrt p_1 \mapsto -\sqrt p_1$ and fixes other $\sqrt p_i$'s, we want to define an element in $Gal(E/\mathbb{Q})$ from this, what do we need to check?
I guess we have to check that $\sqrt p_1 \not\in \mathbb{Q}[\sqrt p_2, \cdots, \sqrt{p_n}]$, and is there anything else that I need to check?
Edit: This is the exercise 18.13 from M. Isaacs. The first part is to show $Gal(E/\mathbb{Q}) = \left(Z_2\right)^n$. This is the second part, and the next part is to show $\sqrt p_1, \cdots, \sqrt p_n$ are linearly independent. So maybe showing $\sqrt p_1 \not \in \mathbb{Q}[\sqrt p_2,\cdots \sqrt p_n]$ is not easy.
Let's define $E = \mathbb Q(\sqrt{p_1}, \sqrt{p_2} \dots, \sqrt{p_n})$ and $K = \mathbb Q(\sqrt{p_2} \dots, \sqrt{p_n})$.
We'll prove the converse of your observation, i.e. we'll prove that $\sqrt{p_1} \notin K$ is sufficient to ensure that you can define an element of ${\rm Gal}(E : \mathbb Q)$ that sends $\sqrt{p_1} \mapsto - \sqrt{p_1}$ while fixing the other $\sqrt{p_i}$'s.
Suppose $\sqrt{p_1} \notin K$. Then $x^2 - p_1$ is the minimal polynomial of $\sqrt{p_1}$ over $K$, and in particular, it is irreducible over $K$. Furthermore, $E$ is a splitting field of $x^2 - p_1$ over $K$.
It is a standard result that if $f(x)$ is an irreducible polynomial over a field $K$, with roots $\alpha_1, \alpha_2$ in some splitting field, then there exists an isomorphism $K(\alpha_1) \to K(\alpha_2)$ that fixes $K$ and maps $\alpha_1 \mapsto \alpha_2$.
Applying this result to $f(x) = x^2 - p_1 \in K[x]$, whose roots are $\pm \sqrt{p_1}$, and noting that $K(\sqrt{p_1}) = K(- \sqrt{p_1}) = E$, we see that there exists an automorphism of $E$ that sends $\sqrt{p_1} \mapsto - \sqrt{p_1}$ and fixes $K$. This automorphism is the desired element of ${\rm Gal}(E : \mathbb Q)$.