Patient description: A 45-year-old woman was referred to the emergency department with abdominal pain lasting about 4 days accompanied by nausea and 2 episodes of vomiting. The pain is localized to the epigastric region and radiates to the right upper quadrant. The pain is worsening after eating fatty food. The patient experienced similar pain twice in the past year. Her past medical history is remarkable for hypercholesterolemia and two C/sections. She has 2 children, and she is menopausal. She doesn't smoke, drink alcohol, or use illicit drugs. She is mildly febrile. Her BP is 150/85, HR 115, RR 15, T 38.2, SpO2 98% on RA. On palpation, she experiences epigastric tenderness and tenderness in the right upper quadrant without rebound. Bowel sounds are normal. Laboratory analysis is remarkable for elevated ESR and leukocytosis with a left shift. The ultrasound revealed several gallstones and biliary sludge. The largest gallstone is 0.7cm. Surgery consultation recommends elective cholecystectomy.

Clinical trial eligibility criteria: eligible ages (years): 18.0-99.0,  Biliary Tract Cancer Patients with histologically or cytologically confirmed advanced (unresectable) or metastatic biliary tract cancer, including intrahepatic or extrahepatic cholangiocarcinoma, gallbladder cancer and carcinoma of the Ampulla of Vater. This includes clinical diagnosis of biliary tract cancer with histological confirmation of adenocarcinoma. 2. Patients who have received and failed one and only one prior line of systemic treatment or advanced or metastatic disease with radiologic evidence of disease progression. This prior line of systemic treatment must also contain gemcitabine 3. Patients with radiographically measurable disease based on v1.1. 4. Patients with no evidence of biliary duct obstruction, unless obstruction is controlled by local treatment or, in whom the biliary tree can be decompressed by endoscopic or percutaneous stenting with subsequent reduction in bilirubin to below 1.5 x upper level of normal (ULN). 5. Patients who are or older than 18 years of age and of or younger than 99 years of age at the time when written informed consent is obtained, and are able to understand and willing to sign the informed consent form. 6. Patients have an Eastern Cooperative Oncology Group (ECOG) performance status of 0 or 1. 7. Patients with adequate organ and hematological function: 1. Hematological function, as follows Absolute neutrophil count (ANC) ≥ 1.5 x 109/L Platelet count ≥ 100 x 109/L 2. Renal functions, as follows Estimated glomerular filtration rate or creatinine clearance > 50 mL/min/1.73m2 3. Hepatic function, as follows Total bilirubin ≤ 1.5 x ULN AST and ALT ≤ 5 x ULN  Patients are currently on or have received anti-cancer therapy within the past 3 weeks. 2. Patients are currently on or have received radiation or local treatment within the past 3 weeks for the target lesion(s). 3. Patients have had major surgical procedures within 14 days prior to study entry. 4. Patients have a metastatic brain lesion(s), including asymptomatic and well controlled lesion(s). 5. Patients have malabsorption syndrome, diseases significantly affecting gastrointestinal function, resection of the stomach or small bowel, or difficulty in swallowing and retaining oral medications. 6. Patients have any history or presence of clinically significant condition which in the opinion of the Investigator could jeopardize the safety of the patient or the validity of the study results. 7. Patients have any history of other malignancy unless in remission for more than 1 year. (skin carcinoma and carcinoma-in-site of uterine cervix treated with curative intent is not exclusionary). 8. Female patients are pregnant or breast feeding. 9. Patients who been previously treated with varlitinib or have been previously treated with capecitabine as first line therapy for advanced or metastatic disease. For patients who have previously received capecitabine as radiosensitizer or as part of their adjuvant therapy and their disease has relapsed for more than 6 months after their last dose of capecitabine adjuvant therapy, their capecitabine therapy will not be considered as a line of systemic chemotherapy for metastatic/advanced disease, and thus they can participate in the study. 10. Patients have received any investigational drug (or have used an investigational device) within the last 14 days before receiving the first dose of study medication. 11. Patients have unresolved or unstable serious toxicity (≥CTCAE 4.03 Grade 2), with the exception of anemia, asthenia, and alopecia, from prior administration of another investigational drug and/or prior cancer treatment. 12. Patients have a known positive test for HIV, active hepatitis C, or hepatitis B infection with hepatitis B virus deoxyribonucleic acid exceeding 2000 IU/mL. 13. Patients have a known history of drug addiction within last 1 year, on the basis that there could be a higher risk of non-compliance to investigational product. 14. Patients need continuous treatment with proton pump inhibitors during the study period. 15. Patients have a baseline corrected QT interval QTc> 450 ms or patients with known long QT syndrome, torsade de pointes, symptomatic ventricular tachycardia, an unstable cardiac syndrome in the past 3 months before screening visit, > class 2 New York Heart Association heart failure, > grade 2 Canadian cardiovascular society angina pectoris, or receiving quinidine, procainamide, disopyramide, amiodarone, dronedarone, arsenic, dofetilide, or sotalol methadone