Sex assignment (sometimes known as gender assignment) is the discernment of the sex at the birth of a baby.