For a few years now I have had excruciating diaphragm muscle cramps on my right side right below the rib cage. About once a week. You stop everything until it passes. Sometimes I think they are due to dehydration and then a certain movement will trigger them. My doctor said there is the diaphragm muscle there but offered no help. Last week I had a new kind of pain that did not go away and ended up getting my gall bladder and appendix scanned - they are fine. That pain is gone although I have slight pain/awareness of that area almost always and I think it was just the same thing happening.
I have read that Buscopan and Levisin may be prescribed for this. Of course now things seem normal so I may do nothing. At least I know its not those organs.