Nearly all the Lovelace hospitals in New Mexico are accepting emergency room patients again after a cyberattack pushed the health system to send people elsewhere.

On Thanksgiving, Lovelace Health System’s parent company, Ardent Health Services, detected a cybersecurity incident later determined to be a ransomware attack. It caused all of Lovelace’s hospitals in New Mexico to divert ER patients.

Nearly all of the hospitals are accepting ER patients again, according to a Wednesday news release.

Heart Hospital of New Mexico at Lovelace Medical Center and Lovelace Women’s Hospital will go off divert Thursday morning at 7 a.m. Lovelace Westside Hospital moved off divert on Tuesday, with the exception of ICU or critical care patients. Lovelace Regional Hospital in Roswell came off divert on Monday, according to the news release.

Lovelace Medical Center remains on divert, according to the news release.

Some non-emergent procedures are still being rescheduled. Patients will be contacted directly by Lovelace staff if they need to move appointments or procedures.