Decision to suspend GP partner for 18 months over alleged sexual activity was flawed, says judge