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

Chapter on Prayer Times

Al-Mughni

Book of Prayer

Book 3 · Issue 1 · Bab 2

Open in Qurani

Primary text

If the loss of reason due to consuming medicine is brief, it is treated as akin to fainting. This ruling is established by analogy to the legal status of temporary unconsciousness.