sex_from_chi function

Extract sex from the CHI number