Driving while texting is so dangerous that it’s outlawed. But doctors and nurses are expected to care for patients while keeping their eyes glued to a computer screen, following prompts and clicking boxes. Some electronic health-record systems require 62 clicks just to order Tylenol, and a full ER shift involves 4,000 clicks. No wonder mistakes are rampant.

Last week, former Food and Drug Administration Commissioner Scott Gottlieb pointed to “risk for patients” from badly designed electronic health-records systems. Babies killed by overdoses when medication orders were entered incorrectly, patients whose cancers weren’t diagnosed because their scans were routed to the wrong file, even an emergency room patient who died while caregivers struggled to access his information.

Going digital was a good idea but Washington hubris turned it into a costly mess. Then-President-elect Barack Obama announced in 2009 that he’d make sure “all of America’s medical records are computerized” within five years.

Government force was employed to make the change happen with lightning speed. The Obama administration’s 2009 stimulus bill slapped hefty penalties on providers that didn’t comply by 2016.

“It’s not that we’re a bunch of Luddites who don’t know how to use technology,” one emergency room physician sued for making a computer error told Kaiser Health News. Doctors were forced to install systems fast, without a clue about which ones actually worked. “There really wasn’t the time to let the cream rise to the top; everyone had to jump in and pick something.”

Medical organizations warned that new technologies have unexpected side effects, and doctors and hospitals needed more time. But Obama pushed ahead, insisting it was an “emergency.”

IT vendors, including major donors to the Obama campaign, rushed to cash in.

Ten years later, here’s the wreckage. It comes with a warning not to allow radical health reformers, ­including today’s advocates for Medicare for All, to insist on sweeping overnight changes. ­Patients pay the price.

Incompatible networks: Taxpayers spent at least $26 billion but got a patchwork of systems that don’t communicate. If you’re in a car accident far from home, the ER doctors don’t have your medical records.

Cookie-cutter care: Obama’s high-tech guru, Dr. David Blumenthal, wanted top-down control of the treatment decisions doctors make. Doctors have to follow computer prompts or be punished ­financially with lower Medicare payments. Blumenthal predicted doctors would resist the loss of ­autonomy, but he also promised it would result in better care and savings from fewer unnecessary tests and treatments.

He was right about doctors resisting but wrong about everything else.

Stanford University researchers examining hospital records from six states, including New York and California, found that hospitals complying with the electronic records mandate don’t have better patient outcomes or survival rates.

Computer programs evaluating when physicians should prescribe statin drugs are “highly prone to errors,” according to a report by Emory University cardiologists.

Cardiologist Dr. Jeffrey Borer warns that atypical patients who don’t fit the protocols lose out.

Burned-out doctors: They’re furious about being turned into “data-entry clerks,” says Dr. Robert Wachter of the University of California, San Francisco. It’s a major cause of doctors abandoning the profession, according to an Annals of Internal Medicine editorial.

Dangerous errors: Getting rid of doctors’ illegible scrawls eliminates some medical mistakes but leads to others. One-third of pediatric patient-safety problems are linked to electronic medical ­records, according to research in Health ­Affairs.

Unhappy patients: They’re yearning for eye contact with their doctor and pestered with computer questions unrelated to why they came in.

Fixing this mess isn’t like tossing a defective toaster and getting a new one. Major hospitals spent $150 million apiece on these systems, and starting over is costly.

The lesson seems to be lost on Washington’s newest wave of health radicals. Many of the Democratic presidential contenders are pledging to abolish private insurers, eliminate employer-provided coverage and trust the federal government to provide better care for less with Medicare for All. Beware their hubris. We’ve been hurt by it before.

Betsy McCaughey is a former lieutenant governor of New York.