First it is easy buy prescriptions in Thailand. Most phamacies will accomendate you and sell any legal pill. Some of the problems you may have is the item you want many not be available here such as Vikadin, but Valium is available.
You can see a doctor in a hospital, but the way they work is the doctor inputs the pills you need directly into a computer system and you get your pills directly from the hospital when you pay the bill so you do not get the paper precription.
You can try to ask either a pharmacist or a doctor for a written docmentation they are usually very helpful.