That being said different rabbis will interpret that differently. Some rabbis will say that the principle (pikuach nefesh) really only applies when a life is on the line, not just someone's comfort, so it wouldn't apply, for, say, prilosec or a painkiller or something that is just a quality of life med. Most rabbinic authorities are very liberal about medical care but it's not unheard of for one not to be.
Considering how often under-medicated chronic pain leads to suicide, I would argue that painkillers = lives ARE on the line.
Re: I am not a religious scholar, this is dregs of memory
Considering how often under-medicated chronic pain leads to suicide, I would argue that painkillers = lives ARE on the line.