What is the ruling on ingesting medicine that causes prolonged loss of reason?

Chapter on Prayer Times

Al-Mughni

Book of Prayer

Book 3 · Issue 2 · Bab 2

Open in Qurani

Primary text

If the loss of reason due to consuming medicine is prolonged, it is treated as akin to insanity (madness).