Grothendieck Group Let $A=\mathbb{Z}$ be a ring, $K=\mathbb{Q}$ its field of fractions, $L$ a number field, and $B = \mathcal{O}_L$, the integral closure of $A$ in $L$. Define the category $C_A$ of $A$-modules of finite length via composition series. 
If $M\in \text{obj} (C_A)$, $M\not = 0$, write composition series, 
$$ 0 = M_0 \subset M_1 \subset ... \subset M_n = M $$
Since each $M_j/M_{j-1}$ is simple we can say that $M_j/M_{j-1} = A/\mathfrak{p}_j$ for some prime ideal. Furthermore, this choice of ideal is not ambiguous, there is only one such $\mathfrak{p}_j$ we can pick, as they are characterized by the prime numbers. The ideal product $\prod_j \mathfrak{p}_j$ is then well-defined as a consequence of the Jordan-Holder theorem. Thus, we have defined a "function" $f:  \text{obj} (C_A) \to I_A$ by $f(M) = \prod_j \mathfrak{p}_j$, where $I_A$ is the ideal group of $A$. 
My question is, why is the function $g:  \text{obj} (C_B) \to I_B$, defined in a similar way, well-defined? The difficulty comes from the following observation. If $\mathfrak{b}$ and $\mathfrak{b}'$ divide $\mathfrak{p}$, and their residue-class degrees are equal then $B/\mathfrak{b} = B/\mathfrak{b}'$ (as fields over $A/\mathfrak{p}$). Thus, it seems there is choice in how we choose the prime ideals in $B$. 
 A: Maybe I'm getting something wrong (if yes, please tell me, in particular if you decide to downvote), but the same argument works for the construction of $\text{obj}(C_B)\to I_B$ as well - there's nothing related to $A$ in it. 
More generally, if ${\mathcal O}$ is a Dedekind ring and ${\mathscr A}$ is the category of finite length modules over ${\mathcal O}$, then:


*

*The Jordan-Hoelder Theorem establishes an isomorphism of abelian groups $\textsf{K}_0({\mathscr A})\cong {\mathbb Z}^{(\text{m-Spec}({\mathcal O}))}$ as the simples in ${\mathscr A}$ are, up to isomorphism, precisely the ${\mathcal O}/{\mathfrak p}$ for ${\mathfrak p}\in\text{Spec}({\mathcal O})\setminus\{(0)\}$. 

*By the definition of Dedekind domains in terms of unique factorization of ideals, $I_{\mathcal O}\cong{\mathbb Z}^{(\text{m-Spec}({\mathcal O}))}$.
Everything sits in a commutative square
$$\begin{array}{ccc} \text{obj}({\mathscr A}) & \longrightarrow & \textsf{K}_0({\mathscr A}) \\ \downarrow && {\scriptsize\cong\hskip0.5mm}\downarrow\\ I_{\mathcal O} & \stackrel{\cong}{\longrightarrow}& {\mathbb Z}^{(\text{m-Spec}({\mathcal O}))}\end{array},$$
in which the left vertical map $$\text{obj}({\mathscr A})\to\textsf{K}_0({\mathscr A})\to{\mathbb Z}^{(\text{m-Spec}({\mathcal O}))}\to I_{\mathcal O}$$ is the map you're looking for. See

Serre, Local Fields, Chapter I, §5: The Norm and Inclusion Homomorphisms

where also the construction of Norm and Inclusion Homomorphisms associated to extensions of Dedekind rings are discussed both in terms of the ideal group and in terms of the Grothendieck group.
