WARNING: The following contains spoilers for The Good Doctor Season 4, Episode 16, "Dr. Ted," which aired Monday on ABC.

Asher hasn't been on The Good Doctor long, but he's certainly left his mark. In the latest episode of the series, "Dr. Ted," the surgical resident makes a shocking decision that puts his future at San Jose St. Bonaventure Hospital in jeopardy.

The majority of "Dr. Ted" focuses on Shaun and Lea as they deal with the fallout of Lea's collapse outside of the hospital at the end of last week's episode. However, Asher is given plenty of screen time as he tends to his newest patient, Maxine. She's an older woman who, after years of partying, decides she's done living.

RELATED: The Good Doctor: Why Chuku Modu's Jared Kalu Left The Show

After collapsing at a party, Maxine comes into the hospital, and while she seems fine at first, she quickly goes into cardiac arrest. Asher rushes to save her, but Park notices a do-not-resuscitate notice on her bracelet, which forces them to stop. To everyone's surprise, though, Maxine wakes up and appears just fine. Asher and Park run some tests and discover Maxine has a device that restarts her heart in the event it stops, which complicates her wish to die.

Maxine wants them to remove the device and allow her terminal cancer to take her life, but Asher has a difficult time understanding why someone so full of life wants to die. Even after Andrews and Park explain that it's Maxine's choice and she feels like she's lived long enough, Asher still disagrees with her decision. He goes to speak to her in her room, and towards the end of the conversation, he feels like he's gotten through to her. She agrees to take the necessary antibiotics to fight off her cancer, ready with a new lease on life.

RELATED: Sandra Oh Shuts Down Fan's Hope For A Grey's Anatomy Return

Sadly, that new outlook doesn't stick, as Maxine invites a group of people to the hospital for her going away party. Confused, Asher confronts his patient, and she explains that after thinking it over, she decided against the treatment because choosing how she dies is important to her. However, the next morning, after expecting to die, Maxine once again wakes up. Park comes to inform that, miraculously, her infection began to go away on its own, prolonging her life.

After telling her the news, Asher heads into the hallway and sits on a bench, just as the hospital's president, Dr. Glassman, begins walking toward him. Glassman informs Asher that given Maxine's condition, it's a miracle that she pulled through. But Glassman clearly knows more than he's letting on, and he tells Asher that he knows that the first-year gave his patient the antibiotics against her wishes. The president won't turn Asher in, but he wants him to go right his mistake.

RELATED: The Rookie: Tragedy Strikes More Than One Family In 'Brave Heart'

Feeling guilty, Asher goes to Maxine's room with documents that will allow her to have a physician-assisted death, allowing her to choose when she goes. However, while Asher thought he was doing the right thing, he made a major mistake that put him on Dr. Glassman's radar, putting his career at risk in the process.

Created by David Shore, The Good Doctor stars Freddie Highmore, Antonio Thomas, Richard Schiff, Paige Spara, Fiona Gubelmann, Will Yun Lee and Christina Chang. New episodes air Mondays at 10 pm ET/PT on ABC.

KEEP READING: One Of Criminal Minds' Best Episodes Is Based On An Infamous Cult