Do social workers follow the patient confidentiality code?

All health care DO. All providers, including social workers are required to respect patient confidentiality, just like dentists, physicians, nurses, and pas. In the case of suspected child abuse for example, it is normall legally required for the provider to alert the authorities (child protection services). There are other situations that would require alerting authorities such as elder abuse and death threats.
Yes they are bound . by the same HIPAA rules and regulations as all other healthcare providers. At least in the USA they are.