Different disciplines may have different views on patient confidentiality. I have gone through code of professional conduct of different professions.
Doctors
In Code of Professional Conduct of the Medical Council of Hong Kong ("MCHK"), the word "confidentiality" appears 15 times [1].
A PHYSICIAN SHALL respect a patient’s right to confidentiality. It is ethical to disclose confidential information when the patient consents to it or when there is a real and imminent threat of harm to the patient or to others and this threat can be only removed by a breach of confidentiality.