A doctor accused of criticising the war in Ukraine in front of a patient has been jailed for five and a half years after being convicted of spreading false information about the Russian military.