The patient snorted a cannabis-filled balloon before going into prison and thought he had swallowed it, doctors said.