Measuring Homogeniety or Diversity of Diagnoses within Patient Groups We are working with grouping medical patients and analyzing features of these groups. Patients have diagnoses, right now we want to analyze how homogenous the diagnoses are in each of the groups. 
Say for example we have a group that has the following diagnoses {A, B, A, A, C} and another group with the diagnoses {A, A, B, C}. We deem the first grouping to be more homogenous as more diagnoses are of the same kind (A). 
We want to systematically score groupings based upon their diagnoses homogeneity essentially.
 A: There are many indices of homogeneity, diversity, and entropy for you to choose from.
If you want to dig more deeply than my Answer, you might start with Wikipedia on 'diversity'.
The Simpson Index of Diversity (also known by other names in various fields of application)
is simple to compute and easy to interpret intuitively. If a categorical
variable has $L$ levels then you find the probability (or relative frequency)
$p_i$ of levels $i = 1, \dots, L.$ The index is $\lambda = \sum_{i=1}^L p_i^2.$
Roughly speaking it is the probability that two people chosen at random from
the whole group will be in the same level. 
If you have five individuals with levels (diagnoses) A, A, A, B, C, then
the $L = 3$ probabilities are 3/5, 1/5, and 1/5 giving $\lambda = 0.24.$
By contrast, a group of four individuals with levels A, A, B, C would be
more diverse (less homogeneous) with $\lambda = 0.375.$ At least for these
two trivial examples, the Simpson Diversity Index performs according to
your expectations. 
I suggest you try the Simpson index in several
settings and examples to see if it is useful for your purposes.  If not,
you can try some of the more complicated indices in the Wikipedia article
and broaden the search as necessary.
