Warning: This article contains spoilers from the first season finale ofThe Good Doctor, which aired Monday night.

Read at your own risk!

In the ABC medical dramas last episode of the season,Dr.

FREDDIE HIGHMORE, RICHARD SCHIFF

Credit: Eike Schroter/ABC

Shaun Murphy (Freddie Highmore)andDr.

Aaron Glassman (Richard Schiff)went on an emotional rollercoaster as they dealt with Glassmansbrain cancer diagnosis.

Unfortunately, Shaun is so distracted by Glassmans predicament that he makes a near-fatal error in the operating room.

Luckily, he and his colleagues are able to catch the mistake before their patient dies.

Nevertheless, Glassman stands by Shaun and accompanies him to Andrews office at the end of the hour.

Thus, both Shaun and Glassmans jobs hang in the balance as the season comes to a close.

And I wanted him to make a mistake, and I wanted to see the fallout of that.

Yeah, right from then I felt like thats a possibility.

The impact that his condition has on Shaun and himself, and their relationship, is something worth exploring.

I think its going to be very relatable.

Were going to follow through on this.

Hes not out of the woods yet.

Hes got a lot of treatment, as he says, and were going to go down that road.

Shaun and Glassman have that I love you moment at the end.

It wasnt quite structured like that, even at the outline stage.

Then when I was writing the script, I rearranged the ending and it just felt right.

I was very pleased with the idea, and I hope people respond to it.

The episode ends with them working into Marcus offices.

This is an emotionally intense episode.

The medicine was a little tricky.

Its gotta be right in that sweet spot of hope.

Then we needed a negative twist and a positive twist.

Thank goodness weve got good doctors to help us.

Thats a vague answer, but its true.

One cliffhanger from the season is Jareds future at St. Bonaventure.

He received an offer from another hospital in the penultimate episode.

Will we return to that in season 2?Yes, I hope so.

Look, theres a lot Im proud of.

You know, speaking like him.

Its not done for any other purpose than mockery.

Theyre truly, I think, paying homage to him.

I hope Im interpreting it right.

At least thats my interpretation.

[Laughs]

The Good Doctorhas been renewed for season 2.