Doctors are always telling people to clean up their diets — so you’d think hospitals would serve some decent salads.

But that’s rarely the case, says Patty Sobol, an executive chef at Northwell’s Long Island Jewish Valley Stream Hospital.

Years ago, Sobol says, she was incensed to see her mom, sick with cancer, being offered “electric yellow” chicken broth, “grayish” meatballs and a high-calorie slice of frozen apple pie.

“[It] made me furious,” Sobol tells The Post, and “ignited a spark.”

That’s why Sobol and other local chefs and doctors have spent the past few years pushing their workplaces toward new culinary heights. For hospital kitchens, that’s meant adopting a “food as medicine” mentality — serving health-supportive, nutritious meals cooked from scratch — and figuring out how to make food taste good without unhealthy ingredients or preparations. In other words, it’s the sort of cooking doctors would like to prescribe to their patients.

“We should all be practicing the same message in our cafeterias,” says Nancy Deenihan-Gruber, site director for food and nutrition services at the Montefiore Medical Center’s Moses Campus in The Bronx.

In 2012, her medical center became a local pioneer in health-conscious hospital food by replacing its sugary drinks and fried foods with a health-conscious, veggie-packed menu. Now, she says, some dishes — such as mushroom ragout and pan-roasted flounder — are so popular that patients and staff ask for the recipes.

Their successes have inspired several other hospitals to clean up their kitchens. Last year, cardiologist Dr. Hooman Yaghoobzadeh and a few others at NewYork-Presbyterian helped roll out new, nutrition-focused patient meals. The dishes read more hip food hall than hospital, with vegetable-stuffed crêpes, Moroccan-spiced chicken stew and a Thai-inspired vegan noodle bowl.

Northwell Health System hospitals across the state have also stepped up their culinary game. In 2017, the medical franchise hired chef Bruno Tison — who earned a Michelin star as executive chef of the Fairmont Sonoma Mission Inn & Spa in California — to shift its offerings from frozen, processed foods to flavorful, wholesome plates (think maple-miso salmon, coconut-chickpea stew and peri-peri chicken).

Other hospitals are bringing in the foodie big guns too: Jeffrey Held, culinary director at NYU Langone, was formerly a chef with Union Square Hospitality Group, the team behind hit restaurants Union Square Cafe and Manhatta.

“I think, especially in New York, bad food is no longer acceptable,” says Held, who’s pushed for the hospital to use more whole-food ingredients, with an emphasis on local sourcing and humanely raised, antibiotic-free meats.

To make Langone’s food taste good without loading it up with salt, sugar or fat, Held says he relies on flavor- and texture-boosting techniques. For example, to give soups and sauces more “body” without excess fat, he’ll puree them, because whipping more air into the mixture makes it lighter and smoother. His team also slow-cooks meats to draw out extra flavor, and uses fresh herbs.

Hospitals are also taking measures to encourage patients and guests to continue eating healthily after they’re discharged. Montefiore’s cafeteria has a stand with fresh produce, pantry staples and free take-home recipe cards; during the warmer months, there’s a farmers market near the hospital’s entrance. Recently, Mount Sinai partnered with meal-delivery service Epicured on a menu of Mount Sinai-approved dishes designed for people with sensitive digestive systems. Plates such as beef sirloin in chili sauce and roasted-veggie sides start at $16.99.

Sobol is glad to see hospitals pushing for change, inside and beyond their walls. The chef, whose dishes were served in Beyoncé’s luxury Lenox Hill Hospital birthing suite, considers it an honor to nourish hospital patients.

“Some chefs are afraid to cook for them,” she says. “But these are people that deserve really good food.”