All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu 'alyhi wa sallam, is His slave and Messenger.
If the department's bylaws and regulations permit a person undergoing the same conditions to be absent during such a period, then you have done nothing wrong and your salary is lawful to keep. You can submit the medical evidence at a later time. Nonetheless, if they do not permit that and this is not stipulated in the contract, doing so becomes impermissible, and in this case, the salary is unlawful for you to take and you have to return this money to the department.
Concerning the leave given by the head of the department, the permissibility of this act is quite clear if he is authorized to do so. If he is not authorized to do so but he did so out of courtesy, then he has violated his work contract.
Allaah Knows best.