Many patients with gastrointestinal diseases are aware of the need for gastroscopy or colonoscopy before consultation, but they do not know what preparation is needed before the examination and often waste time and bring unnecessary worries as a result. Therefore, the relevant aspects of knowledge will be introduced. Gastroscopy 1, blood test preparation: (1) need to draw fasting blood for hepatitis B five and related virology test, if the test results are normal, you can make an appointment normally. In case of positive hepatitis B or the presence of other infectious viruses, gastroscopy specially prepared for such patients needs to be applied. This is because there is a risk of transmission of the virus to other patients through breaks in the mucous membrane of the digestive tract. (2) Blood clotting time test: normal patients can have normal appointments. If a patient has an abnormal clotting time, the patient needs to be asked if he or she has any diseases related to coagulation disorders to avoid hemorrhage when performing a gastroscopy biopsy. 2. Electrocardiogram examination: Because the insertion of gastroscopy through the mouth can bring some irritation and discomfort to the patient, it can cause cardiac accidents. Therefore, electrocardiogram should be performed for elderly patients to determine whether the heart can tolerate it, especially for patients with combined heart disease, more caution should be taken, if the heart cannot tolerate it, it should not be forced. 3, dietary preparation: the night before the examination, into the liquid diet, the morning of the examination, no diet, 2 hours after the examination and then resume the normal diet. 4. If the patient has already done the upper gastrointestinal barium meal examination, he should wait for 4-6 days after the barium is discharged and then perform the gastroscopy. Second, colonoscopy 1, electronic colonoscopy hematology and electrocardiography and gastroscopy is the same, the difference is that before doing colonoscopy need to be intestinal preparation, the intestinal cavity of the fecal excretion clean. There are many methods of bowel preparation, which can be chosen according to the actual situation. (1) application of soap and water cleansing enema; (2) oral administration of 33% magnesium sulfate solution 200 ml; (3) oral administration of polyethylene glycol electrolyte solution; (4) oral administration of senna leaf to slow down diarrhea. Generally speaking, if the physique tolerates, the choice is more feasible; for the elderly and frail patients can consider oral senna to slow diarrhea. 2, dietary preparation: patients who choose the first three methods of intestinal preparation, do not need to prohibit diet, generally the night before the examination, after the intestinal preparation should not be eating, the morning of the examination, you can drink 200-500 ml of sugar water to avoid hypoglycemia. Patients who apply senna to relieve diarrhea need to eat a dregs-free liquid diet while taking it with water.