Gastroscopy is a commonly used clinical examination. Before gastroscopy, attention should usually be paid to the exclusion of contraindications, dietary contraindications, psychological preparation, and pre-test preparation. 1. Excluding contraindications: Gastroscopy is generally not suitable for people with mental cognitive disorders, severe lung diseases such as asthma, respiratory failure who can not lie down, severe hypertension, acute perforation of the esophagus, stomach, duodenum. 2. Dietary contraindications: before gastroscopy, you need to maintain a fasting state, fasting for 6-8 hours before the examination, so as not to obscure the gastroscopic field of view of food, affecting the doctor’s judgment. Patients with pyloric obstruction should fast for 2~3 days. If necessary, gastric lavage should be performed before the operation to remove the food accumulated in the stomach. 3. Psychological preparation: before gastroscopy, you should make psychological preparation, eliminate nervousness and fear, fully understand the necessity and safety of gastroscopy and the method of examination, and actively cooperate with the doctor to carry out the examination. 4. Pre-examination preparation: the general need for oral defoaming agent and local anesthetic drugs before the examination, painless gastroscopy requires the establishment of intravenous access to facilitate intravenous anesthesia. If you need gastroscopy, you should follow the doctor’s instructions to do the precautions before gastroscopy, so as not to affect the results of gastroscopy.