Normally outpatient management, unless complication (see below)
Any of the following suggest need for endoscopy referral:
Age >55yr
Unexplained weight loss
Early satiety
Persistent vomiting
Dysphagia
Anemia or GI bleeding
Abdominal mass
Persistent anorexia
Jaundice
Gastritis
Gastroesophageal reflux disease 
Colitis
Peptic ulcer disease with or without perforation
Pharyngitis
Laryngitis
Pancreatitis
Conjunctivitis