You need to go on a low oxalate diet. An oxalate are crystals - toxins found mostly in plant based foods. Leafy greens like spinach, swish chard ect contain a lot. The crystals are the same thing people who have kidney stones get. But your body may harbor them different. Oxalates can build up on your tendons, in your arteries, in your eyes, just about anywhere in your body. They cause a lot of heart disease too.
I had plantar fasciitis for a few years and when I went to a low ox diet my plantar fasciitis was gone in 3 months. It took me about 2 years to get all the stored up oxalates out of my body. It was extremely painful to detox. At times it felt like I had rebar drilling into my bones. I would lay in bed at night and have pains shooting all over my body. You are suppose to go low oxalate a little at a time, but I was forced to go all at once which caused massive detox.
You can read about oxalates here....
http://www.lowoxalate.info/
Years ago , I tore my long thoracic nerve in my shoulder , I can imagine the pain of your hamstring!
Be well and be blessed...