Discomfort under the ribs on the right side is often considered a possibility for several diseases.
Cholangitis, gallbladder stones, hepatobiliary stones, or inflammatory irritation causing right-sided subcostal discomfort, fever, jaundice, abdominal distention, dyspepsia, and other symptoms, which can be confirmed by hepatobiliary ultrasound and blood work or abdominal CT.
Liver disease. The right side of the rib cage is distended and uncomfortable due to impaired liver function such as acute and chronic hepatitis, hepatitis B, and cirrhosis. This can be diagnosed by a history of previous infection, liver immunomarker tests, liver ultrasound, or enhanced CT.
Occupying lesions of the liver or gallbladder or bile ducts, causing right subcostal swelling and pain on pressure, can be diagnosed by liver function, tumor markers, and ultrasound-enhanced CT.
Right-sided lung and pleural disease, chronic inflammation, etc. can cause right-sided subcostal discomfort, mostly associated with fever, cough, chest tightness, dyspnea, and other discomfort, which can be diagnosed by combining chest X-ray or chest CT, blood work, sputum culture, or pleural fluid examination.
Local discomfort can also be caused by lesions of the rib cage and rib cartilage itself.