Yes medical and licence must be same country!
You can do your medical in any JAA country, the doctor (AME), will send your papers to the CAA of your countries license issuer, who will send you a new medical. (The AME also normally issues you a medical when you do the consultation, it is written on the medical issued by the AME, on behalf of which country this medical has been issued)