When can you rule out ectopic etc?

At what week can you rule out the possibility of an ectopic or chemical pregnancy