In this image taken from video, emergency personnel converge on Bronx Lebanon Hospital in New York, after a gunman opened fire there on Friday, June 30, 2017. (AP Photo/Joseph Frederick)

The gunman who opened fire at a New York City hospital was a doctor who formerly worked there, a police official said.

Dr Henry Bello walked into Bronx Lebanon Hospital at about 2.50pm on Friday with a rifle concealed in his lab coat and opened fire, killing at least one person and injuring six others.

He then apparently killed himself.

Dr Bello was listed on the hospital's website as a family medicine physician.

It is not clear when he left the hospital.

The shooter pulled a rifle from under his white lab coat and opened fire inside the hospital.

Police cars and fire vehicles rushed to the scene and sent officers onto the roof with their guns drawn as people inside the building were told to hide.

Officers went floor by floor looking for the gunman and reported just before 4pm that the shooter was dead inside the building.

A law enforcement official told The Associated Press that the gunman apparently killed himself.

Police were still trying to identify how many people had been shot; emergency crews had been kept from going inside the hospital while the shooter was a large.

The 120-year-old hospital has nearly 1,000 beds and one of the busiest emergency rooms in New York City.

It is about a mile and a half north of Yankee Stadium.

PA Media