The Fyodor Dostoevsky quote from this post is again pertinent. The ruling in this case to compensate prisoners who were not given proper access to treatment for opiate addiction while in prison was a sensible decision by the court (relative to the unspecified amount of compensation).
One could argue that the provision of extremely expensive noncritical care , such as brain surgery, is above and beyond the financial responsibility of a state which does not already provide universal care. However, where socialised medicine exists, such as the UK, all prisoners deserve the same level of medical care as everyone else including drug treatment programmes. To deny medicine or access to care to a prisoner is a violation of human rights and compensation is due in such cases.