You really want to leave your house with SWAT all around and risk getting killed? At a minimum, you'll end up on the ground and in handcuffs before they can sort out who you are.
You call the police emergency line, give them your address and tell them you have a medical emergency. They will get you meds, get you out (if they can, safely), etc. I have worked police dispatch during a situation with a guy barricaded in an apartment building .... black powder bombs, AK, etc. This is how it worked for those in the apartments who couldn't leave & who called for help - mom with sick kid, etc. .... dispatch relayed the situation to the command post & the police made sure they all got help.
But the general thrust of my question was ... under what authority, or where is it permitted for the police to issue such an order.
Essentially this is the denial of liberty or imprisonment without due course of law. There is no judicial review, no warrant etc.