To determine how appropriately physicians in 1981 did upper gastrointestinal endoscopy in a randomly selected, community-based sample of Medicare patients. We developed a comprehensive and clinically detailed list of 1069 indications for upper gastrointestinal endoscopy. A national panel of nine clinicians rated the appropriateness of the indications. We categorized the indications as appropriate, inappropriate, or equivocal. We did a clinically detailed medical record review of a random sample of 1585 patients having upper gastrointestinal endoscopy to assess the appropriateness of using upper gastrointestinal endoscopy. Patients were sampled from large geographic areas in three states. Two areas represented high use, and one area, low use. Random sample of patients 65 years of age or older receiving diagnostic upper gastrointestinal endoscopy. None; the study was retrospective. Patient characteristics, histories, and clinical indications for upper gastrointestinal endoscopy were similar across low- and high-use areas. Overall, 72% of the endoscopies were done for appropriate indications, 11% for equivocal indications, and 17% for inappropriate indications. Upper gastrointestinal bleeding (26%), follow-up to an abnormal upper gastrointestinal series (21%), dysphagia (18%), and dyspepsia (15%) were the most frequent clinical reasons for doing endoscopy. Inpatient endoscopies were more often appropriate and less often inappropriate than outpatient endoscopies. This analysis of practice patterns among study sites provides the clinical basis for understanding the use of upper gastrointestinal endoscopy. The finding of 17% inappropriate use may be cause for concern.