I’ve been having this right side pain for some time now my stomach is hurting as well?

Im (…), 36 i been having this right side pain for some time now but 2 day’s ago my stomach was hurting as well , i went to the er and they did a ultrasound and a x-ray to see why i was having this pain..the doctor said she seen that i had stool not to much and not to little, plus a stone that is enlarged up there , so drink a lot of water and take stool softener..the pain got bad went to a different er..C-T scan and a ultrasound..no stone was seen and c-t was normal smh but i still have the right side pain in the back of rib cage..i had 2 hernia repair and my appendix remove year’s ago