Perth’s three big adult public hospitals had more than 11,000 code blacks last year — the equivalent of 30 reports of aggression a day.

Royal Perth Hospital had the highest number, with 4002 personal threat alarms, while Fiona Stanley and Sir Charles Gairdner hospitals had 3479 and 3587 cases respectively.

The State’s specialist maternity hospital, King Edward Memorial, had five code blacks a week in 2017.

Code blacks are incidents of actual or potential aggression that could cause harm to staff, patients or visitors.

Not all result in violence and some relate to patients with conditions such as dementia or mental illness which could make them confused and a risk to themselves and others.

The Health Department said hospitals had different ways of reporting code blacks so their figures could not be compared.

Hospital staff were encouraged to call a code black when they saw a situation that could become an aggressive incident, to prevent it from escalating.

Code blacks included violent altercations, verbal or physical aggression or where a staff member felt threatened.

They also occurred where a confused patient would not follow instructions and nursing or medical staff needed assistance, self-harm attempts or threats and armed intruders.

A department spokeswoman said anti-social and violent behaviour directed at staff, patients and visitors in public hospitals was unacceptable and not tolerated.

Frontline staff received specialised training to recognise quickly and respond to the early signs of aggressive behaviour.

“All metropolitan hospitals are equipped with security measures appropriate to their needs, including guards, alarms and police resources where required to ensure the ongoing safety of staff, patients and visitors,” the spokeswoman said.

Australian Medical Association WA president Omar Khorshid agreed that the high number of code blacks was linked to hospital staff being encouraged to report incidents earlier rather than waiting for them to get out of hand.

But they also reflected the violence and aggression seen across the wider society.

“There’s no doubt we’re seeing a big problem with alcohol and drug-affected behaviour, particularly at the front door of hospitals such as emergency departments, so they will be responsible for a lot of these code blacks,” Dr Khorshid said.

“It’s totally unacceptable that staff in a hospital are put under the threat of violence and there is a zero tolerance by government but it can be hard to achieve that.”

Dr Khorshid said a planned behaviour assessment unit for unruly patients at Royal Perth Hospital was a step in the right direction.