Article 199 [source]

Spanish Criminal Code
English translation

1. Anyone who reveals the secrets of others, which they have learned by reason of their profession or employment, shall be punished with imprisonment for one to three years and a fine of six to twelve months.

2. Any professional who, in breach of their duty of confidentiality or secrecy, divulges the secrets of another person, shall be punished with imprisonment for one to four years, a fine of twelve to twenty-four months, and special disqualification from practicing their profession for a period of two to six years.