Is there not another doctor you can see at the practice?
I don't know what it could be, it could be nothing, maybe just some small muscle spazzums that are occuring every now and again, but it is worth getting it checked out by someone to get a more accurate point of view.
Welcome to the MedHelp forum!
If you have pain under your right rib then there could be a liver infection or a gall bladder problem. Get a liver function test, ultrasound or CT of abdomen, and pancreatic enzymes. It can also be due to acidity and duodenal ulcer. Take a late night snack. Raise head end of bed. Take Omeprazole empty stomach in morning and an antacid gel at bedtime. Refrain from smoking, alcohol, fuzzy drinks and spicy food. Walking around also helps clear gas. It could also be muscle pull that can be treated by applying local analgesic creams. It could also be costochondritis, which causes pain and tenderness at points where your ribs attach to your breastbone. The inflammation around the joint area gives sharp pain on taking a breath. This can also cause tenderness on pressing the area which pains. An orthopedic doctor can diagnose this for you. Generally there is no cause. However it can be due to infection, blow, injury, or fibromyalgia. It usually goes away on its own. Otherwise it can be treated with muscle relaxants, and non steroidal anti inflammatory drugs. It can also be muscle pull. Shingles can also start this way. If all these are ruled out, then laproscopy should be done. Such an undiagnosed pain is usually due to adhesions and cutting the adhesions takes care of the pain. Pain under right rib case can also be due to pleurisy, asthma, or any other lung problems. Usually this is accompanied by lung related symptoms like breathlessness, cough etc. Since a confirmed diagnosis cannot be given on net please discuss with your doctor once. Hope this helps. Take care!