At first glance Sami Inkinen, an elite triathlete and co-founder of the real estate company Trulia, and Rita Perkins, a grandmother of eight in central Pennsylvania, have little in common. But they do share one thing: Both have grappled with diabetes. "I thought, This is absolutely nuts," Inkinen recalled of his diagnosis with prediabetes. "It was really a personal experience and a shocking experience that a world-class triathlete can become type 2 diabetic or prediabetic." For Perkins it was less of a surprise. Diabetes ran in her family, she said, and her weight had reached 300 pounds before she lost about 100 just through increased walking. But her diet was still bad, and she struggled to control her blood sugar. Now things have turned around for both Perkins and Inkinen. And their paths were both through food. In Shamokin, Pennsylvania, about 75 miles northwest of Allentown, Geisinger Health System is trying something new for some of its diabetes patients. Instead of relying solely on drugs to manage the disease, doctors are writing prescriptions for certain patients to enter its Fresh Food Farmacy program: 15 hours of education about diabetes and healthier living, followed by 10 free nutritious meals a week for participants and their families.

Dietitian Anna Ziegler selects fresh produce for a Fresh Food Farmacy patient. Geisinger

"In health care we spend an awful lot on drugs and devices because it's business," said Dr. Andrea Feinberg, Geisinger's medical director of health and wellness. "But we spend a very small amount on preventive medicine. … It's sort of like we're upside down and backward." The program targets people with diabetes and food insecurity, those for whom it's not always clear where the next meal will come from. "We understand the relationship of food insecurity and the impact that poverty has on developing certain lifestyle conditions, like type 2 diabetes," Feinberg said. She added that the goal is "to diminish complications of diabetes and also close the meal gap to end hunger." The program, started 18 months ago, is a partnership with the Pennsylvania Food Bank. So far, it's enrolled 150 patients, feeding a total of about 450 people a week.

Food as a specialty drug for diabetes and the heart

Rita Perkins, her husband and three grandchildren who live with them are among those families. For Perkins the program has been transformative. Each week, she visits the Farmacy and picks out food with guidance from a nutritionist. Perkins said the food, along with what she learned in the course about managing diabetes, has changed not just her approach to eating but also her family's. "Before, I'd never buy this stuff; I would never buy fresh fruit," Perkins recalled. "Money was tight. And now since I get this stuff for free, I can put it on the table for the kids." Since she started the program, Perkins said her weight has dropped to 134 from 179. She walks all over town and said her doctors are evaluating the doses of her diabetes medications. Her blood sugar, measured by an A1C test, has been a steady 5.8 percent for the last six months (normal A1C, according to the National Institutes of Health, is below 5.7 percent).

If a new diabetes drug became available that could double the effectiveness of glucose control, it would likely be priced considerably higher than $6 per week (and if it wasn't, the pharmaceutical firm's stockholders would be in revolt). Andrea Feinberg Geisinger's medical director of health and wellness

Those results aren't atypical. On average, patients in the program have seen their A1C levels drop from a pre-enrollment level of 9.6 percent to 7.5 percent, Feinberg and colleagues wrote in an April article in NEJM Catalyst that they called "Prescribing Food as a Specialty Drug." "Clinically, we see great outcomes," Feinberg told CNBC. "The impact is that we really know long-term that we'll see a decrease in incidence of heart disease, the No. 1 killer here in the United States, because if you improve the diabetes, improve your cardiac risk factors, you have less heart disease as well." The program also should save money. With operational costs of $2,400 per patient each year, early findings show costs for patients in Geisinger Health Plan dropped by 80 percent: from an average of $240,000 per member per year, to $48,000 per member per year. "If a new diabetes drug became available that could double the effectiveness of glucose control, it would likely be priced considerably higher than $6 per week (and if it wasn't, the pharmaceutical firm's stockholders would be in revolt)," Feinberg and her colleagues wrote. Indeed, spending on diabetes drugs in the United States reached $53.7 billion last year, more than double what it was in 2013. The number of prescriptions in that time rose 18 percent, to 227 million, according to data from industry researcher IQVIA.

Ketogenic diet led to drop in blood glucose, weight and drug usage

Almost 3,000 miles away, in San Francisco, Inkinen got his startling diagnosis: He was pre-diabetic even as he set records in endurance sports (in 2014 he and his wife rowed across the Pacific Ocean, from California to Hawaii, he said on his blog: 2,750 miles in 45 days and 3 hours, setting a speed world record for two people.) His solution? The ketogenic diet, a high-fat, low-carbohydrate way of eating that's enraptured many in Silicon Valley. "There is a way to reduce insulin resistance without exercise, without dieting or without bariatric surgery, using the traditional ketosis," Inkinen told CNBC. "But to deliver this type of treatment, you would need technology and the ability to continuously monitor and deliver care."