Moving on from the medical, China isn't keen on protests either.
Here is the English translation (pdf) of the guidelines for foreigners entering China for the Olympics. It's 13 pages long, here are some highlights:
The rules about who can't leave China include anyone suspected of a crime, even before they are investigated or punished (no mention of a trial, they seem to go right from investigation to punishment.) Here's the wording for the third group of people who won't be allowed to leave:
(3) Where the foreigner is an individual whom the relevant authorities believe should be investigated for a suspected violation of China's laws and who has not yet been investigated or punished.
Don't forget your papers. Police can demand them at any time.
Foreigners shall carry proof of identity at all times. Police responsible for foreign affairs at public security organs above the county level shall have the power to examine the passports and other identity documents of foreigners in the course of their duties.
If you're leaving China with more than $5,000.00, you have to fill out a form.
Don't even think about doing drugs. Or defacing the flag. Or yelling insults at the referees. Or using the Olympics logo to make a buck. Also, no guns, ammunition or daggers and no sleeping overnight in public places.
What are the Chinese laws on selling, possessing, and using narcotics?
The laws of China define narcotics as any addictive anesthetics and mind-controlling substances like opium, heroin, methamphetamines, morphine, marijuana, cocaine, and other drugs controlled by the Chinese government. China prohibits smuggling, selling, shipping, manufacturing, illegally possessing, providing or forcing narcotics onto others, luring, abetting, tricking others to use narcotics, or injecting drugs.
There's also a special provision prohibiting drug activity when out having fun:
Public places of entertainment, including includenightclubs, dance clubs, erotic dance clubs, karaoke bars, discos, arcades etc, are open to the public as places of business for patrons to enjoy themselves.
....Any activities relating to narcotics, such as selling or supplying, and organizing, coercing, instigating, luring, cheating, or accommodating others in the use of narcotics are prohibited in all public places of entertainment.
As for protests:
To hold a rally, demonstration, or protest, one must apply to do so at the Public Security Office in accordance with law. Without permission, one may not hold a demonstration or conduct any related activities.
Anyone who instigates or plans an illegal rally, demonstration, or protest and does not listen to orders to stop such activities, shall be administratively sanctioned or criminally punished in accordance with law.
I've never been to Beijing but I've been to Shanghai twice and never felt legally constrained or like I was in some kind of police state. That said, if I were going for the Olympics, I'd be sure to bring along the name of a trusted American law firm with offices in Beijing.