The Academy of Motion Picture Arts & Sciences is facing a lawsuit from a former employee who says the Academy refused his requests to work from home while recuperating from cancer treatment.

Rodolfo Davila, a former human resources manager, filed suit in L.A. Superior Court on Monday. Davila alleges that the Academy refused to comply with his doctors’ instructions and ultimately fired him, which caused him such stress that he had a heart attack.

Davila says that he was diagnosed with Stage 4 cancer in May 2015, when a large tumor was discovered between his heart and lungs. He went on an eight-month disability leave while he endured seven rounds of chemotherapy and open heart surgery. At one point, he says he was given a 10% chance of survival.

He was cleared to return to work in March 2016, and his supervisors initially accommodated his need for a flexible work schedule, according to the complaint. However, that changed when the Academy hired a new managing director of human resources, Lisa Kaye. According to the suit, Kaye challenged the validity of Davila’s doctor’s note, saying at one point, “What does this mean that you’re allowed to work from home when needed? If you don’t come into the office, you’re a consultant or an independent contractor, that’s not an employee.”

Kaye urged Davila to go on disability if he could not come into the office full time, according to the suit. Davila refused, saying he was capable of working 40 hours a week. Kaye also told Davila that Dawn Hudson, the Academy’s CEO, was not aware that the Academy had previously been accommodating his requests for a flexible schedule, and that it was no longer acceptable, according to the suit.

The Academy also requested access to Davila’s medical records, with Kaye telling him that she did not trust his doctors’ notes. He refused. The Academy fired him about a week later.

Asked for a comment, Academy spokeswoman Teni Melidonian said, “The Academy does not comment on pending legal action.”

Davila now works for Full Screen Media and his cancer is in remission.