Does the "z" mean "by"?
No, it mostly means "from" (check here for other meanings). That's just one of the numerous examples when Polish uses a totally different preposition than English.
Thank you. If I understand correctly, you basically say: "I am a doctor from profession". That can make sense if I think about it :)
I wrote "by profession I am physician", which may be a bit unusual but I think it is still correct, so it should not be an error.
Added "physician", such a construction is accepted, but you need "a". But there was a report like that, so maybe it was yours and you just missed 'a' writing the comment.