Sure, just like instead of prescribing anti-depressants, we should first do a depression test.
Unfortunately, neuroscience is not at a level where we can actually perform these tests. There is no objective measure to see if someone is in pain, or depressed, or suffering many other psychological symptoms.