Unless you are in imminent danger of harming yourself or others, you may choose to leave an inpatient facility at any time, though it may be detrimental to your treatment.