(CNN) -- For years, hospitals have embodied a paradox.
Hospitals offer greens and fresh produce at the farmers market outside the Vanderbilt Medical Center.
As patients are tethered to dialysis machines, and many lay bedridden from obesity-related diseases, the hospitals' fast food joints and cafeterias dispense fried goodies and slick burgers that contributed to such conditions.
"With fast food establishments, hospitals are sending a message that food is not important to health," said Jamie Harvey, a food coordinator of Health Care Without Harm, a coalition of hospitals and health-related groups. "But we know that's wrong. We're starting to see in a sweeping way that food is essential to health. Hospitals are adapting to that message."
Some hospitals around the country have gone on a diet: Deep fryers have gone cold, trans fats have been banished, and the glow of the golden arches (and other fast food symbols) have dimmed as leases have quietly gone unrenewed.
Instead, these hospitals are offering an alternative food source: farmers markets.
Patients who've been warned to improve their diets can now walk out of the hospital and find locally grown strawberries, apricots and baby red potatoes sold on the parking lot. Kaiser Permanente, the nation's largest not-for-profit health system, has 30 farmers markets in mostly Western states like California, Washington and Oregon.
"The focus on local food systems gives us food that's good for us, good for our children, good for farmers that grow it and it's good for the Earth," said Dr. Preston Maring, a family physician for 38 years who brought the concept of farmers markets to Kaiser in 2003.
Having locally grown fruits and vegetables next to a hospital gives people the visual connection between good food and better health, Maring said.
"It's clear to me over all these years what people eat is the single most important determinant of their overall health. It just struck me one day -- why not bring good food to a place where people get their health care to see if it could become a focal point for education?"
One of the farmers, Roberto Rodriguez, who sells organic strawberries at the Kaiser Permanente farmers market in Oakland, California, said the customers say the local goods are "sweeter, fresh and last longer."
The concept of farmers markets at hospitals is not entirely new, but it has started to spread -- to places like Mount Sinai Medical Center in New York, University of California San Francisco Medical Center in California, and the Vanderbilt Medical Center in Nashville, Tennessee, which opened its farmers market in May.
Dr. Lenny Lesser, a member of the policy committee for the National Physicians Alliance and a family medicine resident at Tufts University, said the recent wave of farmers markets is promising, but hospitals can do more.
Lesser worked on a 2006 study that showed 42 percent of 234 U.S. hospitals sold fast food such as Wendy's, McDonald's and Pizza Hut.
"There's definitely an air of change," he said. "There has not been a huge change in terms of brand name fast foods that are still available. Many hospitals are trying to bring in healthier options, but not necessarily eliminating the harmful options."
Indeed, eliminating fast food franchises can be tough.
In one case, the chief executive officer at the Cleveland Clinic, who is also a heart surgeon, sought to get rid of a McDonald's franchise inside the Cleveland, Ohio, medical facility in the early 2000s. But McDonald's was halfway through a 20-year lease with the hospital. The parties reached a compromise that the fast food restaurant would add healthier options on its menu.
The hospital will not renew the lease with the Big Mac maker when it expires, said clinic spokeswoman Eileen Sheil. The clinic also opened a local farmers market last year on its premises.
Locally grown vegetables and fruits are also making their way onto cafeteria trays for hospital patients, employees and visitors. Instead of a container of gelatin or a glop of cake -- which have inspired photo blogs dedicated to the wonders of hospital food -- patients get an in-season peach or bowl of strawberries plucked from a nearby farm.
The cafeteria at Fletcher Allen Health Care in Burlington, Vermont, relies heavily on seasonal, organic produce grown by local farmers. It serves entrees such as veggie paninis (made of roasted garlic hummus, spinach, tomatoes, roasted red onion and balsamic drizzle) and whole wheat flatbreads topped with roasted vegetables and basil pesto. The cafeteria attracts more than hospital visitors and employees; it has morphed into a destination spot for the downtown lunch crowd.
Three years ago, Fletcher Allen Health Care started using mostly local ingredients, such as grass-fed beef and lamb, artisan cheeses, mesclun and butter lettuce.
Locally grown produce such as lettuce is "fresher, has more crispness to it," said Richard Jarmusz, an executive chef at the hospital. "The flavor is more intense. As food sits and ages, it loses all that flavor. It's evaporating. It's leaving the lettuce. Some things have been sitting a week before you get it. The stuff you get locally are picked that morning."
Jarmusz was the executive chef for ski resorts and restaurants before he came to the hospital.
"When I first came to health care, you could see they needed help in the quality of the food because of the bulk," Jarmusz said. "Here we are at a health care facility [yet] we are preparing fried foods. After somebody sees a cardiac doctor who tells them their cholesterol is too high, he stops at a cafeteria and gets French fries. The message is mixed. Now we're delivering the appropriate message."