The following common conditions could be the reason for pain in the right upper abdomen. It is called a differential diagnosis. Physical findings, symptoms and diagnostic tests have to be used to rule a diagnosis in or out.
The liver can also bring on similar pain in that region (hepatitis, liver cancer, liver abscess, subphrenic abscess). The right kidney is also possibly causing pain in the right upper abdomen (kidney stone, pyelonephritis) through referred pain.
Diagnostic tests, which would help the physician to pinpoint the cause to consider would be blood tests such as liver function tests regarding whether or not the patient has hepatitis. A complete blood count with white blood cell count would show whether or not there is an underlying infection (cholangitis, pyelonephritis, subphrenic abscess). A urine test would show whether there is a kidney infection (pyelonephritis). An ultrasonic study of the right upper abdomen, the right kidney, the gallbladder and the liver) would reveal gallstones, a kidney stone or a process in the liver (liver cancer, liver abscess). An enteroscopic procedure (gastroenteroscopy) would show an active duodenal ulcer. Biopsies are also helpful to diagnose Crohn’s disease or to confirm a liver cancer. A liver abscess can be drained through a laparoscopic procedure.
These are only the most common conditions that can produce pain in the right upper abdomen. There are others, less common ones that I left out for clarity.