I can second this. I suffer badly enough to use strong opioids daily. Up side of them is I can code pretty well on it. I prefer weed for a better sense of self, but find it hard to code(impossible).
As a few others have mentioned, try a CBD concentrate. CBD is another cannabinoid in marijuana, but it doesn't make you high and it seems to be primarily responsible for the pain-relieving effects of marijuana.