Hello. I am working with a dataset that has multiple observations for most of the identifiers labeled study_id. I would like to reshape wide but there is no variable indicating the order. Please see example of my data below. Is it possible to reshape such that the first medication is labeled med1, and the second (if any) is med2, etc.?

[CODE]
Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input int study_id str34 med
  4 "cyclobenzaprine"       
  5 "lorazepam"             
  5 "promethazine"          
  5 "trazodone"             
  6 "alprazolam"            
  6 "eszopiclone"           
  7 "cyclobenzaprine"       
  7 "temazepam"             
  8 "citalopram"            
 9 "cyclobenzaprine"       
 22 "amitriptyline"         
 24 "venlafaxine"