West Australian hospitals face an exodus of junior doctors, the medical association warns as new figures show the extent of bed shortages.
Perth metropolitan hospitals recorded 71 "bed state blacks" in May, indicating they could not accept additional intensive care patients.
A further 31 were recorded in country hospitals, according to figures recently provided by WA Health following budget estimates hearings.
Code yellows, indicating an infrastructure or other internal emergency which could include capacity issues, were called 51 times in Perth hospitals.
The department also revealed capacity issues had forced 311 maternity bypasses, where expecting mothers are redirected to different hospitals to give birth, in the year to May.
Opposition health spokeswoman Libby Mettam said the figures indicated a "distressing lack of choice" for pregnant women.
"We clearly have a health system which is on its knees," she said on Tuesday.
"It must be incredibly distressing for those frontline health workers and managers trying to manage the dire shortage of beds and for those patients and families waiting for beds to free up."
The figures provided to parliament showed the health system was short of 349 junior doctors on a full-time equivalent basis.
Australian Medical Association WA president Mark-Duncan Smith said young doctors were struggling with burnout and looking for opportunities elsewhere.
"Many of them advised me that they were considering leaving the tertiary hospital system and doing locums within the health system, most likely within the country," he told reporters.
"They have a system that is demoralising for them because they can't deliver the care that they want to be able to deliver to their patients."
WA Health said the overall health workforce had increased by 16 per cent in the two years to March including hundreds of doctors, with recruitment ongoing.
It said hospital system notifications changed constantly throughout the day as demand ebbed and flowed.
"They are a snapshot at a moment in time and can change status multiple times throughout the day, for mere minutes at a time," the department said.
Ambulances spent 6982 hours ramped outside hospitals in July, overtaking the record set last August.
Ramping, where patients face long waits to be handed over to emergency departments, has blown out since the McGowan government took office in 2017.
The government recently poured a further $252 million into emergency departments, including funding to free up beds occupied by long-stay hospital patients.