The five-episode order marks the first freshman drama of the 2017-18 season to get a full-season pickup.

The Good Doctor's residency has been extended.

ABC has given a full-season order to the Freddie Highmore medical drama, ordering five additional episodes to bring the total count to 18.

"We are thrilled to announce that we are giving our viewers additional episodes of The Good Doctor,” ABC Entertainment president Channing Dungey said Tuesday in a statement. “We have an amazing team in front of and behind the camera, led by Freddie Highmore’s incredibly nuanced performance as Dr. Shaun Murphy, and we’re confident the show will continue to captivate our audience.”

The pickup comes after two weeks of solid ratings for the series. Airing after Dancing With the Stars on Monday evenings, The Good Doctor has shown impressive retention. The second episode brought a 2.4 rating in the adults 18-49 demo and 11.5 million viewers, matching its opening showing. Additionally, viewership for the premiere episode has since grown to a 3.7 rating and almost 17 million viewers with three days of delayed viewing factored in.

Featuring Highmore in his post-Bates Motel TV role, the series centers on a young surgeon with autism and savant syndrome who begins work at a prestigious hospital.

House grad David Shore serves as showrunner and executive produces with Hawaii Five-0 alum Daniel Dae Kim, Erin Gunn, David Kim and Sebastian Lee. Seth Gordon directed and exec produced the pilot.

The Good Doctor is based on a 2013 South Korean series of the same name and was originally developed by CBS Television Studios in 2015 before it landed at Sony Pictures Television Studios and ABC Studios, who are co-producing the project.

The series is one of several Sony projects at ABC, including the family comedy The Goldbergs and the Zach Braff midseason entry Alex, Inc.

The Good Doctor is the first freshman drama of the 2017-18 TV season to get a full-season pickup and only the second rookie series of the season, following CBS' Young Sheldon. The Big Bang Theory prequel series earned a full-season pickup after its premiere episode, which earned a 3.8 rating and averaged more than 17 million viewers.