The episode was written by Gary Glasberg and directed by James Whitmore, Jr. Glasberg wanted "to tell an emotional story for the characters" while at the same time "recap the last 8 seasons of the show", featured by old scenes using flashbacks from previous episodes.
Inspired by an old M*A*S*H episode where the unit talks to a psychiatrist "to make sure they all haven't lost their minds", Glasberg got the idea of introducing Dr. Cranston as "an interesting approach on the show" [REF].