More hospitals are testing the mental fitness of older patients before surgery amid evidence that the trauma of an operation can accelerate cognitive decline.

Evaluating patients for memory and thinking problems can help doctors anticipate how patients will tolerate the surgery and follow care instructions once they get home. A cognitive assessment also can assist patients’ families and caregivers in deciding whether to proceed with a surgery by giving them more information about the potential risks.

Studies show as many as 81 percent of patients who meet the criteria for dementia have never had a formal diagnosis, and families may overlook symptoms as just natural age-related memory loss. Patients with dementia are at higher risk for a complication known as postoperative delirium, and are more likely to have worse surgical outcomes, longer hospital stays, functional declines and death.

Without a formal cognitive assessment, “we are consenting all these people for major operations they may not understand, and they may not be able to deal with what happens afterwards,” says Dr. Stephanie Rogers, a geriatrician at University of California, San Francisco. UCSF, which began in 2014 to do pre-operative cognitive testing on all patients in its heart-failure clinic, hasn’t gone ahead with some surgeries after patients were found to have significant cognitive decline.

The American College of Surgeons and the American Geriatrics Society recommend that hospitals assess any patient over 65 for cognitive impairment as part of a preoperative evaluation. Stress, inflammation, pain, medications and anesthesia that often accompany surgery are especially tough on older patients.

Angel Guerrero, 78, had surgery at UCSF in 2013 to manage his heart failure, which makes the heart muscle unable to pump enough blood to meet the body’s needs. His family had previously noticed some subtle hints of memory loss—he would often forget where he left his keys and repeat questions. But they didn’t think anything of it because Mr. Guerrero still drove, shopped online and booked his own flights, says his daughter,Georgina Fox. During pre-operative discussions about risks and benefits, Mr. Guerroro’s memory issues weren’t evident, the family didn’t bring them up, and he didn’t receive a formal cognitive assessment.

Mr. Guerrero’s doctors surgically implanted a mechanical pump known as a left ventricular assist device, or LVAD, which helps a weakened heart pump blood. The device is powered by a battery attached to a tube brought outside the body that has to be regularly recharged. The site also needs to be kept clean to prevent infection.

Click for more from The Wall Street Journal.