Jack Nicholson's own experience in the hospital, just prior to filming, inspired some of the dialogue and acting for the movie. For example, the mirrored glasses seen in the movie were not originally in the script, but Nicholson, who obtained them while in the hospital, brought them to set. Director Rob Reiner decided to include them in the film.
The trivia item below may give away important plot points.
Kopi Luwak is indeed the most expensive coffee in the world selling for between $120 and $600 USD per pound. Its production is very slow due to its 'animal stage': the beans come from coffee berries which have been eaten by and passed through the digestive tract of the Asian Palm Civet.