The best thing that the parent could do is identify the child as male or female based mainly on the predominant external appearance.
If, the child has grown into adulthood, then the child should be given a full right to choose his/her own gender depending on which gender that the child is feel the most comfortable with.