Practice Fusion, a medical records startup that attracted more than $150 million from VCs, including at Founders Fund, Kleiner Perkins and Artis Ventures, has received its share of negative press since selling to its older, publicly traded rival Allscripts in a $100 million cash deal in early 2018.

Yet it appears that Practice Fusion, founded in 2005, was run even more poorly than has been previously reported. In fact, the company was just tied to the drug overdose epidemic that has killed tens of thousands of Americans in just the last few years alone.

How is it possible that a seemingly boring, venture-backed, San Francisco-based medical records startup could have that kind of impact? In a word: kickbacks.

According to the U.S. Department of Justice, Practice Fusion solicited and received pay from an (unnamed for now) major opioid company in exchange for using its EHR software to influence doctors in the act of prescribing opioid pain medications.

Specifically, according to court documents released earlier today by federal prosecutors in Vermont, Practice Fusion solicited a nearly $1 million payment from the opioid company, promising that in exchange it would create alerts in its software that would cause physicians to write more prescriptions for extended release opioids than were medically needed.

Practice Fusion has agreed to pay $145 million to resolve the DOJ’s criminal and civil investigations, including a $26 million criminal fine and a $118.6 million civil settlement that “also resolves allegations of kickbacks relating to thirteen other CDS arrangements where Practice Fusion agreed with pharmaceutical companies to implement CDS alerts intended to increase sales of their products.”

Practice Fusion has also agreed to post documents about its conduct on a public website — though apparently not on its own site, which instead features very typical marketing language, beginning with the suggestion that visitors “meet the EHR that helps independent practices thrive.”

Neither is information available on the site of Allscripts, which says it has already taken measures to address the ordeal. A statement released by an Allscript’s vice president today reads: “Since learning of this matter we have further strengthened Practice Fusion’s compliance program. Allscripts recognizes the devastating impact that opioids have had on communities nationwide, and we are using our technology to fight this epidemic.”

Allscripts has denied from the start that it knew the depths of Practice Fusion’s woes, even while it apparently had an inkling that all was not hunky-dory. According to numerous reports, AllScripts submitted a nonbinding letter of intent in May 2017 to purchase Practice Fusion for between $225 million and $250 million, which is twice what it paid seven months later.

According to FierceBiotech, Allscripts pulled its offer in June 2017 after another EHR vendor, eClinicalWorks, settled with federal prosecutors for $155 million to resolve allegations that it falsified EHR certification. The “settlement suddenly clarified [for Allscripts] just how expensive a similar legal battle could be,” says the outlet, noting that the DOJ had separately reached out to Practice Fusion with questions about its own EHR certification in March of 2017.

Either way, by last August, Allscripts was ready to put the entire affair behind it, announcing during a second-quarter earnings call that it had agreed to pay the $145 million settlement after reaching an agreement with the DOJ related to what was then an ongoing investigation.

At the time, Allscripts President Rick Poulton told shareholders, “As you know from our previous SEC filings, DOJ began investigations into certain practices of Practice Fusion before we acquired the business early last year. These investigations had many similarities that have either been settled or remain active with many of our industry competitors.”

Poulton added during that same call, “After acquiring Practice Fusion, the DOJ investigations continued to expand and required expanding levels of resources from us to support.”

The company’s new admission of guilt and accompanying settlement is a black mark for those involved with Practice Fusion from its earliest days, particularly given that this latest news punctuates a string of concerning revelations about the way Practice Fusion was managed.

Soon after the startup was acquired by Allscripts, for example, CNBC published a report outlining “several years of missed targets,” a “management shake-up that resulted in the ouster of founder and CEO Ryan Howard,” and a board that was “quietly looking for a way out.”

CNBC also reported that many longtime employees left the company with nothing, while managers “banked millions” in a pre-arranged carve-out.

Christina Nolan, U.S. Attorney for the District of Vermont, had her own harsh words in delivering news of the settlement earlier today, calling Practice Fusion’s conduct “abhorrent.”

Said Nolan, “During the height of the opioid crisis, the company took a million-dollar kickback to allow an opioid company to inject itself in the sacred doctor-patient relationship so that it could peddle even more of its highly addictive and dangerous opioids.

“The companies illegally conspired to allow the drug company to have its thumb on the scale at precisely the moment a doctor was making incredibly intimate, personal, and important decisions about a patient’s medical care, including the need for pain medication and prescription amounts.”

According to the Centers for Disease Control and Prevention, overdose deaths from opioids have increased almost six times since 1999. Overdoses involving opioids killed close to 50,000 in 2017, and 36% of those deaths involved prescription opioids.

The Practice Fusion case is the first-ever criminal action against a vendor of electronic health records, according to Nolan’s office.