BOOK I-GENERAL PART
TITLE II-THE ACT
CHAPTER I-BASES OF PUNISHABILITY
Article 20º
No imputability by reason of a disease of the mind
1- A person is not imputable if, due to a disease of the mind, he is incapable, at the time of committing the act, to appreciate its unlawfulness or to conform his conduct in accordance with that appreciation.
2- A person may be declared not imputable if, due to a serious disease of the mind, not accidental and whose effects he cannot control, without being thereby censurable, has, at the time of
committing the act, the capacity to appreciate its unlawfulness or to conform his conduct in
accordance with that appreciation, sensibly diminished.
3- The agent’s proved incapacity to be influenced by punishment may constitute a sign of the situation defined in the previous number.
4- Imputability is not excluded when the disease of the mind has been caused by the agent himself with the intention to commit the act.
Incapacity - national proceedings
Insanity - national proceedings
Mental disease or defect - national proceedings
EDIT.