1. I don't know how you did it. If it was done discreetly not in the view of the boss, I don't the boss should be unhappy about it. I am sure you know what to do to avoid the displeasure.
2. A proviso in Section 37 of the EA as quoted below may be relevant. If the MC issued by the doctor was related to the pregnancy, then it can be treated as commencement of maternity leave.
"Provided that where a medical officer or the registered medical practitioner appointed by the employer certifies that the female employee as a result of her advanced stage of pregnancy is unable to perform her duties satisfactorily, the employee may be required to commence her maternity leave at any time during a period of fourteen days preceding the date of her confinement as determined in advance by the medical officer or the registered medical practitioner appointed by the employer. "