200%? Like, they massively over-produce locally?
Yes.
If you produce at least 50% of local demand, you get patent protection for that medicine, but with mandatory licensing. So the country can buy the medicine from 3rd party countries, paying you a fixed amount for the doses. The doses you produce locally need not be consumed locally; quite possibly you will want better profits than the mandatory licensing permits you to capture.
If you produce twice enough for local demand, you no longer have mandatory licensing. This will involve exporting, or hell making it and burying it. I don't care what you do with it.
The national security reason is pretty simple; countries have proven willing to shut down trade in an emergency. This endangers national security and the safety of the population.
It isn't
safe to depend on imported medicine.
So if you want to have any patent protection, have factories that are local that can't be shut down by emergencies, so we have guaranteed local supply. If not, then we will import from nations that violate your patents we do not recognize, or let locals produce it without patent protection.
And if you want full protection, produce enough locally that if we need more in an emergency we can claim it.
Naturally there are issues, like 50% of all of the supplies needed by the supply chain.
You could permit some parts to be handled by stockpiles. If you stockpile, say, 2 years of supply in the country you might be excused from producing that supply locally.