Robert Picardo, who plays the doctor that examines Gary, would also star as a doctor in Star Trek: Voyager (1995), and many Star Trek series and films since, as the Emergency Medical Hologram, a holographic doctor. Additionally, Picardo guest stars as a doctor in other notable series including The Golden Girls (1985), The Practice (1997), Castle (2009), United States of Tara (2009), Austin & Ally (2011), and Bones (2005), in addition to Early Edition (1996). His first series starring role as a doctor was as Dr. Dick Richard in China Beach (1988).
The doctor (Robert Picardo) mentions there are men who mistake their wives for hats. This is a reference to the book "The Man Who Mistook His Wife for a Hat and Other Clinical Tales" by neurologist Oliver Sacks. His most well-known book is probably "Awakenings," which has a movie based on it.