Prescriptions for healthy foods could help lower the risk of expensive chronic illnesses like cardiovascular disease and diabetes in Medicare and Medicaid patients, a new study suggests.

Researchers used computer models to calculate that prescribing healthy food to patients could prevent as many as 3.28 million medical conditions such as heart attacks and strokes, and save more than $100 billion in health-care costs, a study from Tufts University in the medical journal PLOS Medicine found.

The research team observed people between the ages of 35 and 80 who were enrolled in Medicare and or Medicaid, and used data from the National Health and Nutrition Examination Survey from the past three years. The team then came up with two scenarios to measure how patients’ health and general cost would be impacted with health food prescriptions.

For the first one, they examined the financial impact of covering 30% of the costs of fruits and vegetables under Medicare and Medicaid; in the second, 30% of the costs of fruits, veggies and other healthy foods like plant oils, nuts, seafood and whole grains would be covered.

The study determined that under the proposed prescription models, patients would rely less on health-care. Researchers found that the first food-prescription model would decrease health-care costs by nearly $40 billion. The second policy model would reduce health-care costs by more than $100 billion.

The results were similar on the health and wellness front. Researchers found that subsidizing fruits and veggies would prevent 1.93 million cardiovascular events such as heart attacks and 350,000 deaths. What’s more, subsidizing fruits and vegetables along with other healthy items would prevent 3.28 million cardiovascular conditions, 620,000 deaths and 120,000 diabetes cases.

“From a health-care perspective, considering policy costs and formal health-care costs, the food and vegetable incentive was estimated to save $39.7 billion in formal health-care costs, with net costs of $83.5 billion over a lifetime; corresponding values for the healthy food incentive were larger at $100.2 billion and $111.1 billion, respectively,” the study explained.

A number of other studies have proven the myriad benefits of eating healthy and its impact on mental and physical wellness compared to junk food.

The model of implementing food as medicine has already garnered some traction. The 2018 Farm Bill included $25 million in funding for produce prescription pilot programs. In an effort to keep chronically-ill patients at home and out of hospitals and nursing homes, California launched a three-year $6 million pilot program last May to give 1,000 recipients with Type 2 diabetes or heart failure free, nutritious meals.