Patients were randomly assigned to an inpatient ( 6 months of hospitalization on working days ) or an ambulatory ( 12 days of hospital visits at increasing intervals during a 6-month period ) treatment program .