Hi
If the baby is being uncooperative (!) ie- lying in a funny position that the doctor cannot see, then I understand that the only 100% certain way to tell the sex is by having an amnio test or similar. Not sure if they will do that now that you are 22 weeks and also, unsure whether a doctor will perform an amnio just because you want to know the sex (normally used to tell Downs syndrome and other chromosomal abnormalities).
If you can hold off, I am sure that your doctor will be able to tell you the sex once the baby is bigger. We went to Dr Lam for our 12 week scan and he told us with 90% certainty (so he said) what the sex was.
SB2