Be it further enacted by the authority aforesaid that the mayor and council shall have authority to elect a city physician, whose duties shall be such as are required by the ordinances of said city and by the direction of the mayor and council, and whose compensation shall be fixed by the ordinances of the city and by the mayor and council.