Two U.S. hospitals are joining Americans in the "food as medicine" trend that has been gaining popularity in recent years. 

"Food as medicine" refers to eating natural food, similar to what our ancestors ate thousands of years ago before artificial flavors and preservatives became a large part of the average Western diet. 

It's believed that certain foods have medicine-like effects if used correctly, which is why St. Joseph's Hospital in Ann Arbor, Mich., and Stony Brook Medicine in Long Island, N.Y., are starting to use food in this way as well, reported ABC News

St. Joseph's Hospital in Michigan turned a hospital lawn into a farm in 2010. The farm was since named  The Farm at St. Joe's and includes three  large "hoop houses," which are greenhouse-like structures that provide seasonal produce for the market; patient meals, the hospital's cafeteria and local food banks. The farm is used throughout the year. 

"We began the farm in response to health of the community and the health of our own 6,000 hospital workers," Rob Casalou, president and CEO of St. Joseph Mercy Ann Arbor and Livingston hospitals, which are both located in Michigan, said to ABC News.

Halfway across the country on Long Island, Stony Brook Medicine also adopted the food as medicine trend for their patients when it started using its rooftop garden, which is run by Iman Marghoob, a registered dietitian and horticultural specialist, to feed patients. 

Marghoob told ABC News the farm is also used as a teaching for local agricultural education and will be expanding it next year - hopefully adding berries and other perennials.

When using food for medicine, people must pay attention to the six basic tastes in food: sweet, sour, salty, pungent, bitter and astringent. Each taste corresponds to different health-promoting nutrients, reports Healthy.net

Sweet foods are carbohydrates and fats, which are filled with energy and fiber.

Sour, mildly acidic foods can help with digestion when consumed in small doses. Salt also helps with digestion when consumed in a small dose. 

If you are fighting an infection, pungent, or "hot," foods are the way to go, as they fight off infection.

Bitter foods have detoxifying, disease-preventing and healing chemicals that improve our chances for long, healthy lives. 

Lastly, astringent foods (such as beans, legumes and peas) add vegetable protein, complex carbohydrates and fiber to your diet. They also are usually a main component to an age-reversing diet.