After gastroenteroscopy, you can eat and take medicine for H. pylori after 1-2 hours. After gastroenteroscopy, because the process of gastroenteroscopy will cause some stimulation to the mucous membrane of the gastrointestinal tract, or the anesthesia will also affect eating, so it is not advisable to eat too early after the operation, and you can eat or take medication after 1-2 hours after the operation. After gastroenteroscopy, if you need to take medicines to eradicate Helicobacter pylori, you can take omeprazole, lansoprazole, bismuth potassium citrate, colloidal bismuth pectin and other medicines 30 minutes before meal, and then you can eat some fluids or semi-fluids, such as rice porridge, noodles, etc., and then you can take medicines such as clarithromycin, amoxicillin, metronidazole, etc. 30 minutes after meal. If gastroenteroscopy procedure is done and it is determined that there is H. pylori infection, please follow the doctor’s instructions for treatment.