With the increased stomach cancer patients in recent decade, endoscopy became one of the major examination tools for diagnosis. In conventional endoscopy, physicians are required to stay through the whole examination, which leads to an increased burden for both physicians and patients. Based on this observation, we introduce an automated gastric endoscopy by utilizing conventional endoscopes with object recognition algorithms. We then propose a cancer diagnosis system which can work in cooperation with any e-health system. In the e-health environment, the proposed system can pre-determine whether the patient has cancer or not. Based on the pre-determined result, the physicians are requested to conduct more accurate diagnosis on the existence of the cancer. In addition, it can automatically save its decision in the e-health system, which enables physicians and patients to access the record later.