LEWISTON, Maine (AP) — Two hospitals that operate emergency rooms turned away psychiatric patients and had them arrested, causing their conditions to worsen at the jail in some cases, according to recently released documents from state licensing inspector.

Hospital staff at Central Maine Medical Center and St. Mary's Regional Medical Center sometimes deleted patient records, or never recorded the encounters with those patients, the Bangor Daily News reported.

The reports detail failures that violate federal law requiring all hospitals receiving Medicare funding to screen and stabilize anyone who shows up at the emergency room requesting treatment.

Emergency rooms are the first stop for many patients who need mental health treatment, said Kevin Voyvodich, a managing attorney with Disability Rights Maine, which alerted the state Division of Licensing and Certification and the federal Centers for Medicare and Medicaid Services of potential violations.

"If that's the entry point and you're being turned away at the entry point and arrested, people aren't getting the psychiatric services they need," he said.

The reports cited several specific examples from last fall but it was unclear how many psychiatric patients were turned away.

The hospitals submitted plans in May detailing how they'll correct the violations and those plans were deemed to be acceptable by federal officials, allowing the hospitals to continue receiving Medicare payments.

"We are always looking for opportunities to improve our processes and our operation. We are currently especially focused on improving staff training and education because our overriding commitment is to provide the very best care possible for all our patients," said Karen Sullivan, a spokeswoman for St. Mary's parent organization, Covenant Health,

Kate Carlisle, a spokeswoman for CMMC, said the hospital "has taken steps to prevent future incidents."

"A recent inspection by CMS found that appropriate steps were taken and the investigation was closed. CMMC's highest priority is providing top quality care to all patients who walk through our doors," she said.