It's possible to sort just a single column, leaving all the columns beside it in their original sort order. That's very bad if you want to keep your rows in one piece.
Race and sex should be inputs. Giving any medical prominence to gender identity will result in people receiving wrong and potentially harmful treatment, or lack of treatment.