A New York City clinic where Joan Rivers suffered a fatal complication during a medical procedure made several errors, including failing to keep proper medication records and snapping cellphone photos of her while she was unconscious, state health investigators said Monday.

Rivers, who was 81, died Sept. 4. New York City's medical examiner found she died of brain damage due to lack of oxygen after she stopped breathing during an endoscopy days earlier.

A report released by the state Department of Health on Monday cited Yorkville Endoscopy for numerous deficiencies related to the Rivers case, although negligence is not alleged. The comedian's death was classified as a therapeutic complication.

As a result of the state investigation, the federal Department of Health and Human Services has given Yorkville Endoscopy until Jan. 7 to correct deficiencies to avoid losing Medicare accreditation.

In a statement to NBC News on Monday, Yorkville said it has submitted a plan to state and federal accreditation agencies addressing all issues raised. It said the physicians referenced in the report no longer provide services there.

The state report said the Manhattan clinic "failed to identify deteriorating vital signs and provide timely intervention" in Rivers' case.

Investigators found conflicting information in Rivers' medical records regarding the amount of the sedation drug Propofol she was administered and about the time resuscitation was initiated. They also faulted the clinic for allowing a surgeon who was not a member of the medical staff to perform two nose and throat scoping procedures.

Investigators also noted that a staff member took cellphone photos of Rivers and a surgeon while she was under anesthesia without her consent and in violation of the facility's cellphone policy.