If someone takes a non-intoxicating prescription pill without prescription (i.e. ADHD pills) would he loose the rewards of Salah for 40 days?

Ustadh AbdulAziz al-Haqqan
You said non-intoxicating, and I advise you not to take anything without going to doctors first and they prescribe to you.