TRUNK-3652

fix for [TRUNK-3652] Natural ordering of Patient State is not consistent with equals