The announcement comes days after a female doctor was stabbed to death at a Beijing hospital.
The law bans any organisation or individual from threatening or harming the personal safety or dignity of medical workers, according to state media.
It will take effect on 1 June next year.
Yang Wen was working at Beijing Civil Aviation General Hospital’s emergency ward on 24 December when she was attacked by a man.
Chinese media claims he was related to a patient who was receiving treatment on the ward.
Zhao Ning, an official at the National Health Commission said: “We are deeply aggrieved and enraged by this incident, particularly as the relevant law was being deliberated.”
‘My job as a nurse can be terrifying’
China’s barefoot doctor – ‘We did have shoes’
Under the new law, those “disturbing the medical environment, or harming medical workers’ safety and dignity” will be given administrative punishments such as detention or a fine. It will also punish people found illegally obtaining, using or disclosing people’s private healthcare information.
It’s not the first case of a death or violence in a Chinese hospital.
According to CGTN, there were at least 12 “medical incidents” involving violence and two medical workers were killed in 2018 alone.
A recent survey by Dingxiang Yuan, an online site for healthcare professionals, found 85% of doctors had experienced violence in their workplace.
The article went on to add: “Doctors are responsible for protecting society from diseases. Who protects doctors?”
An article in medical journal The Lancet claims there are many reasons why doctors in Chinese hospitals are under threat.
Poor funding can result in errors or breakdowns in communication between doctors and patients, while other factors include negative media reports about medical staff, unrealistic expectations and large healthcare bills for families on low incomes.