When are locks permitted on patient sleeping room doors?

A) At all times for privacy
B) Only during visiting hours
C) Only with the patient's consent or when there's a documented medical need
D) Only for patients with a history of escape attempts