DARBY, Pa. - A doctor wounded by a patient in a deadly shooting Thursday afternoon at a suburban hospital campus in Darby, Pa. returned fire and wounded the patient, authorities said.

Investigators believe the doctor had his own gun and acted in self-defense, Delaware County District Attorney Jack Whelan said.

The patient, who had psychiatric problems, opened fire after entering the doctor's office with a caseworker Thursday afternoon, Whelan said. The female caseworker was killed. The doctor appears to have suffered only a graze wound and was expected to be released from treatment later in the day.

Get Breaking News Delivered to Your Inbox

Authorities have not publicly identified the gunman or his two victims. CBS Philly reports Whalen said the gunman was shot three times. Both the doctor and the suspect were taken to the Hospital of the University of Pennsylvania for treatment, according to the station.

The shootings occurred on the third floor of a wellness center attached to Mercy Fitzgerald Hospital in Darby, just southwest of Philadelphia. The center, which does not have metal detectors, is attached to the hospital by a pedestrian bridge.

Just what led to the shooting was unknown, Whalen said. Two guns were recovered, and the shooting was still being investigated.

"The scene is secure. Everyone is safe," Whelan told a late afternoon news conference.

The 213-bed teaching hospital is part of the Mercy Health System, a large Catholic health care network serving the region.