Staff at a Sydney hospital where a police officer and security guard were shot overnight bravely carried on with their duties as the drama unfolded around them, a witness has said.

The police officer, Senior Constable Luke Warburton, was shot with his own gun, grabbed during a scuffle with a man who had earlier allegedly been threatening a doctor with scissors at Nepean Hospital.

NSW Police said officers were called to the hospital just before 10:30pm on Tuesday.

A 39-year-old man, who police had dealt with earlier that night over a separate matter, was at the hospital receiving medical treatment, Acting Commissioner Catherine Burn said.

Key points: A police officer and security guard are shot during a struggle with a man at Nepean Hospital

A police officer and security guard are shot during a struggle with a man at Nepean Hospital The officer lost control of his gun, NSW Police says

The officer lost control of his gun, NSW Police says The officers were responding to reports a man was threatening a doctor with scissors

The officers were responding to reports a man was threatening a doctor with scissors A 39-year-old man has been arrested

The officer became involved in a struggle with the man, losing control of his firearm in the process, she said.

The police officer suffered a gunshot wound to the upper leg and a security guard a gunshot wound to his calf.

Both men underwent treatment at Nepean Hospital.

Acting Commissioner Burn said the police officer was listed as critical but stable, and the security guard was listed as stable.

Another security guard was hurt during the incident but his injuries and condition were unknown, she said.

The 39-year-old man was arrested and has since been charged with shoot with intent to murder, discharge firearm with intent to resist arrest, and detain for advantage.

The man has been refused bail to appear at Penrith Local Court today.

'Nursing staff were brilliant'

Police were called to the hospital just before 10:30pm. ( ABC News )

Local resident Jodie Bennett, 39, was in the emergency ward of the hospital with her eight-year-old son when the shooting occurred.

"I heard a woman screaming quite hysterically. Then following that there was some gunshots," she said.

"What I saw was blood. Lots of blood on the floor.

"The response was excellent. The nursing staff were brilliant. They were very quick to act.

"As soon as I heard the screaming I heard very clearly nursing staff call the police, call security. They were on the ball really quickly.

"Two nurses in particular were great in regards to my son and I. One came in to make sure we had the door closed and curtain closed.

"Another one came inside and just looked after us and did her job despite whatever she might have been feeling."

Ms Bennett said the hospital offered some counsellor support when she left the ward.

"I'm OK. Probably more concerned about my son and what he heard," she said.

"There were gun shots and I assumed that the person who was doing the wrong thing had been shot but when we looked under it was actually a police officer who had been hit."

Police officer's family at bedside

Acting Commissioner Burn said Senior Constable Warburton's family members were at his bedside.

"The police officer underwent surgery and was in the intensive care unit," she said.

"The other security guards were also being attended to.

"The officer has been clearly seriously injured and his welfare is paramount.

"He has his family and colleagues at the hospital with him."

She said the incident was a "clear example of the nature of policing".

"This officer had only just left his home and was only just about to start his shift when this call came in and this has occurred," she said.

A critical incident team from North West Metropolitan Region will investigate the incident.

"There were reports of an incidence and police responded, with security," Acting Commissioner Burn said.

"There was a struggle and during that struggle the police officer did lose control of his firearm.

"Then a number of shots were fired."

The state's Health Services Union said the shooting highlighted how an increase in violence in emergency departments.

Union secretary Gerard Hayes said hospital security staff need to be given the power to restrain and detain people who threaten staff.

"Consistently we see injuries coming to nurses, to doctors, to health workers, to visitors, and we have been calling on the Government for some time to have a summit to deal with this," he said.