goodness! how these people open the copmanies without basic knowledge of laws and rules in qatar?
NOTHING can be automatically.
1. Once your work visa was issued your company has to switch your business visa to work visa. Issuance of the work visa by itself has no meaning until it's stamped into your passport. So all this time you were still on the business visa, which was expired over a month ago.
2. QAR.500 is a Government fee for switching visa status. Your company must pay it.
3. Why did you go to the medical 2 months later? You should have done right after switch visa.
4. Since your visa has not been switched, and you were on the business visa all this time, the penalty for overstaying on Business visa is 200QAR per day, which your company has to pay
5. You can't leave Qatar without paying the penalty.

You are stuck my friend.. and you know why? Because initially you bought the business visa illegaly. You deserved it. good luck.