When I worked in the Neuro ICU, we used to give ranitidine and cimetidine to patients who were on steroids. To help prevent gastric problems.

Occasionally, one of the patients would develop what we called cimetidine psychosis, - confusion, depression, disorientation, hallucinations. The same types of side effects can present with ranitidine.