Hacienda Healthcare in Phoenix posted its only perfect inspection back in April, one day before it was given a state license. A few months later, the facility where a woman with severe intellectual disabilities gave birth in December is back in hot water.

The facility is now 30 days away from losing its license. It has 60 days to file an appeal. 

In a letter, the Centers for Medicare & Medicaid Services announced it was terminating its agreement with Hacienda Healthcare. The agency said the facility would "no longer participate in the Medicaid program."

The termination is effective July 3, according to the letter.

"CMS requires facilities to meet certain health and safety standards to be certified as a Medicaid provider," the letter reads. "Involuntary termination of a provider agreement is generally a last resort after all other attempts to remedy the deficiencies at a facility have been exhausted."

CMS said the facility failed to "meet Medicaid’s basic health and safety requirements."

AHCCCS released a statement about the notice:

"On June 18, the Centers for Medicare and Medicaid Services issued a notice of termination of Medicaid participation to Hacienda HealthCare, effective July 3, 2019. The termination notice is in response to a facility survey conducted by CMS earlier this year, prior to the State’s licensure oversight of the Intermediate Care Facility for Individuals with Intellectual Disabilities (ICF-IID). The CMS termination notice provides Hacienda HealthCare 30 days to continue receiving Medicaid payments. Hacienda HealthCare has 60 days to file an appeal challenging the CMS action.

Because AHCCCS had instituted a suspension of payment for new Medicaid admissions to the Hacienda HealthCare ICF-IID and Skilled Nursing Facility (SNF) effective in January 2019, no new AHCCCS members have been admitted to Hacienda HealthCare since that time.

The State is reviewing all options regarding the best care and treatment for members in the Hacienda ICF-IID, many of whom have lived at Hacienda for many years. In the coming weeks, AHCCCS and DES will facilitate discussions with members and families to determine the best options specific to each member’s needs."

Hacienda released a statement Thursday concerning the letter received from the CMS:

"The leadership team at Hacienda HealthCare continues to work with state and federal oversight agencies to determine the best path forward for our ICF residents and their families, our staff members and our organization. We intend to follow the guidelines to the letter, including the appeal process, which will allow the ICF to continue to operate while all parties work out a solution.

We remain intensely focused on the well-being and safety of every person we care for - in the ICF and all our facilities - and on making sure our residents and their loved ones face no interruption of services and no disruption to their quality of life. In everything we do, our primary concern remains on delivering quality, compassionate care for every Hacienda resident who relies on us."

Here's how things went down to get Hacienda a license

In January a federal inspection found 108 pages worth of deficiencies at Hacienda. Some of them were corrected -- but some are still listed on the Arizona Department of Health Services website as ongoing.

RELATED: A look back at Hacienda Healthcare's problems 

But on April 23, DHS told Hacienda they inspected the facility -- and found no deficiencies. The next day, Gov. Doug Ducey signed a bill giving DHS the ability to license Hacienda and Hacienda got its license.

But just 15 days later, a DHS survey again found major deficiencies at Hacienda. The inspection found the organization failed to implement their abuse policy and detailed two incidents of possible abuse that inspectors said went nowhere.

PREVIOUSLY: Arizona licenses center where incapacitated woman was raped

What happened?

The first incident involved a resident who went off-site with his family. When he came back, staff reported he had a bruise on his cheek, another on his arm and blood coming from his left nostril.

The second incident involved a patient who apparently ended up on the ground fighting employees when they tried to fasten a seatbelt on his wheelchair.

Neither one of these incidents, the report said, was dealt with according to a plan.

MORE: 'Pray for me': Police report shows Hacienda rape suspect's behavior changed before victim gave birth 

Could Hacienda Healthcare lose its license?

Last week DHS moved to revoke Hacienda's license after finding maggots on a patient's throat. A DHS spokesman told 12 News the April inspection was not as thorough as the inspection in May, and Hacienda received its license because DHS could not consider the January report.

PREVIOUSLY: Arizona seeks to revoke Hacienda facility's license after maggots found under patient's bandage

Gov. Ducey, who signed the bill to license the facility, said he's concerned for patients.

"What I want the patients and their families to know is we want to do this in the safest possible way," he said.

A Hacienda spokesman said all those issues have been corrected. Hacienda has 30 days to request a hearing or lose its license.