Shanghai Health and Family Planning Commission reported two deaths of patients with the virus, one of whom was a 31-year-old doctor, surnamed Zhang, who worked as a surgeon at Shanghai Pudong New Area People's Hospital.
The hospital said the doctor could not have been infected with the virus from patients because it has admitted no H7N9 cases.
An investigation by local health authorities found other possibilities. The doctor was at his parents' home on Jan 4, near a neighbour who kept pigeons. Also, a live poultry trading market is located near the hospital where Zhang worked, the Shanghai Health and Family Planning Commission said.
Zhang did not have contact with anyone showing flu-like symptoms 10 days before he developed symptoms, the commission said on Monday.
Patients who were treated by Zhang have been checked, but no abnormal symptoms have been found so far, nor have symptoms been found in any of Zhang's other contacts.
Local health authorities were continuing to investigate.
So far, the city has reported seven human H7N9 infections, all scattered cases, according to the commission.
Zheng Shusen, an academician at the Chinese Academy of Engineering who is also the president of the No 1 Hospital affiliated to Zhejiang University, said the public needn't panic because there is no evidence that the virus can spread from human to human.
Meanwhile, good personal hygiene and avoiding contact with live poultry can protect people from infection by the virus.