"medical certificate" covers any certification of health or illness written by a doctor. It could correctly be used in both sentences.
"doctor's certificate" can also apply to any certificate of health, illness, to confirm that a person is taking particular medicines or has had specific vaccinations etc.
It could also be used in both sentences.
"Do I need to have a good health record to take the trip?
Yes. Students must show proof of being in good physical health before the trip (a doctor's certificate)."
http://www.fiu.edu/~ciber/faq.htm"You do not normally need a doctor's certificate for the first seven days of illness ..."
http://www.glastonburysurgery.co.uk/sicknote.htmlIt is not usually necessary to add "of health" as it is clear from the context whether health or sickness is the issue.
In the above examples, Werner's suggestion to add "of health" would apply only in the first sentence.
Conversely, a "doctor's note" or "sick note" could be used only in the second sentence (as Wienfan aus London suggests) as this implies illness.