The symptoms you describe suggest-
- An over exertion causing feverishness along with indigestion
,gases formation & constipation
. The gases being lighter,accumulated under right rib cage
. it created pressure &pain. You were relieved after clearing bowels. Such pains are relieved with soda water cosumtion/ mild purgative as per need.
- If you had associated urinary problem.(pain,burning,frequency) it may present like this. Urine infection does give mild fever with rigour,pain under rib cage ,which can go to front of abdomen,back side along vertebral
column,low down the abdomen.
- However, coughing any time does create pressure & discumfert in lower abdomen.
Now, if the symptoms are repeating /persistent,I would suggest consultation of your doctor , urine examination & treatment as per need.