DALLAS (CBSDFW.COM) – A last minute agreement may be saving the life of the Parkland Health and Hospital System.

The hospital signed a deal Wednesday to fix serious safety problems, just two days before the Centers for Medicare and Medicaid Services were scheduled to cut off payments.

The hospital will have a full time, independent compliance officer, along with a team of consultants and even national experts who will be hired to fix safety violations.

Two reviews this summer found patients were not being examined or stabilized correctly.

Employees were not wearing masks or washing their hands.

Some drugs, records and equipment were not being maintained.

The deal gives Parkland until April 2013 to bring the hospital into compliance.