Was this a HIPAA/patient confidentiality violation?

Yup. I’ve been working on writing hospital administration software, and one of the biggest things we’re designing is the patient confidentiality bits. A clear relationship between a patient and a caregiver must exist in order for that caregiver to see the patient information. Just because you work at a hospital - even if you’re the top doctor bigshot - doesn’t mean you have to right to see any patient info except your own patients. There are exceptions in case of emergency.