The doctor would not be informing the PD that you are a patient. All kinds of people come and go through hospitals, not just patients.How do they inform the police that YOU had a firearm without also informing the police WHO you are?
Doc: "Hello, Sergeant Smith? I work at County General and a man who just entered the building had a pistol fall out of his pants. Could you please come down and retrieve the pistol and investigate the matter? Thank you."
The man could have been an employee, outside vendor, patient, or family member.
As to the OP, I agree with the others: depends on the jurisdiction. I would not like to get caught like that in NYC or DC.