When any prisoner is removed to a state hospital or to a state prison or is released to the custody of an officer of another jurisdiction, his money and valuables or the remainder shall be transmitted to the hospital or prison or entrusted to the officer for the prisoner’s account.