Three prestigious Boston hospitals are being fined nearly $1 million after the feds slapped them with HIPAA violations regarding the documentary series “Save My Life: Boston Trauma” — even as the hospitals maintain they did nothing wrong.

Massachusetts General Hospital, Brigham and Women’s Hospital and Boston Medical Center all reached settlements announced yesterday with the U.S. Department of Health & Human Services. MGH paid the most at $515,000, followed by Brigham at $384,000 and BMC at $100,000.

The feds say the hospitals handed over patients’ protected medical information to ABC without first getting permission from patients during filming of the series in late 2014 and early 2015.

“That’s a major amount. It is unusually high,” Boston health care lawyer Timothy Cornell, who was not involved in the cases, told the Herald yesterday of the settlements. “This shows the degree to which the patient’s identity was exposed.”

The agreements did not require the hospitals to admit liability — and they are maintaining their innocence.

A BMC spokesman told the Herald, “Boston Medical Center obtained proper consent from all patients involved in this filming project in full compliance with HIPAA.”

MGH and Brigham, which together comprise Partners Healthcare, said in a joint statement, “Neither BWH nor MGH received complaints from patients or their families regarding ABC News’ presence at the hospitals,” a Partners spokesman said. “In fact, some patients and families expressed gratitude about being given an opportunity to share their stories and experiences in a way that could help others across the nation.”

“In 2014, MGH and BWH agreed to participate in the ABC News documentary to provide viewers a window into the expert care that academic medical centers deliver every day — the kind of care that had been the focus of national attention in the wake of the Boston Marathon bombings. The hospitals believe that working with the media is a vital means of educating and informing the public about medicine and health care, reinforcing messages about disease and prevention, and providing reassurance to those who may one day require the expertise and skill of a trauma center.”

The hospitals said they had news crew members undergo HIPAA training and sign confidentiality agreements. All patients included in the documentary had to give consent in writing and had to be allowed multiple opportunities to back out.

ABC did not respond to requests for comment. The documentary series, which aired in six installments in July and August 2015, depicted the trauma departments of the world-renowned Boston hospitals.

HIPAA — the Health Insurance Portability and Accountability Act — is a 1996 law that governs medical patient privacy by binding what medical personnel can release.

Robert Thompson, a pop-culture expert who teaches at Syracuse University, said medical shows, both real and fictional, have been popular since the days of radio, and are important pieces of media output — assuming everyone follows the rules.

“The medical experience is as close to universal as you’re going to get,” Thompson said. “We’re all going to end up in a hospital. Getting sick and being in love are the two things that everyone is going to experience.”