## 1 Introduction  
The _Operation Room_ (OR) is one of the most expensive material resources of the hospitals (in Spain being about 40% of the total hospitalization cost [1]) and approximately 60% of patients need it at some point during their hospital stay [2]. On the other hand, the demand for surgical services is increasing due to the aging population. In Spain, the average life expectancy is about 81.8 years being one of the highest in Europe [3]. Moreover, as a result of the economic crisis in 2008, the number of surgical interventions performed annually in Spanish public hospitals has stagnated at 3.5 million. This situation has also contributed to a continuous increment in the number of patients in the surgical waiting lists, reaching 600,000 in 2017 [4]. In some cases, these huge lists lead into waiting times greater than six months, which is becoming a serious problem for the healthcare system. Being difficult to increase the surgical resources, the importance of improving the efficiency is accentuated. New management techniques, scheduling methods, and specific information systems could help to improve the efficiency of the surgical services and, consequently, could reduce the surgical waiting lists. The main objective of this work is to provide a DSS for managing surgical services in hospitals. In particular, a software tool (called CIPLAN from the Spanish words _PLANificacion de Clrugias_) is presented that may be used by medical doctors to automatically perform a scheduling of the patients. It is assumed that the uncertain parameters (surgery duration and cleaning time) follow a normal distribution and, consequently, the expected total duration of a surgical block also follows a normal distribution. In this way, the probability of exceeding the working time can be introduced as a capacity chance constraint. Even if the lognormal distribution may give better approximations of the surgery times [5], the optimization problem has nonlinear constraints, being difficult to solve. Since, in general, acceptable error is obtained for normal distribution, this work assumes this type of distribution. The following three criteria have been considered for the scheduling problem. _C1. Maximize the occupation of the ORs._ Since the ORs with their associated cost constitute the bottleneck of the system (they can be open only during a given period of time every working day and their cost is high), the first scheduling criterion is to maximize the occupation of the ORs. In this way, the underutilization of the ORs is prevented and the use of resources is maximized. _C2. Ensure with a minimum confidence level that the total available time in a time block is not going to be exceeded._ On contrary to _C1_, an over-scheduling of the ORs is not desired since the last scheduled surgeries can be canceled if the medical personnel believes that the time of the time block will be exceeded. Among other problems, such cancellations reduce the _real_ occupation rate in the ORs. _C3. Respect as much as possible the order of the patients in the waiting list._ Due to ethical and common sense reasons, patients with the same urgency level should spend a similar time in the waiting list. For that, once the patients in a waiting list are ordered depending on the urgency level and the admission date, the third scheduling criterion is to respect as much as possible the order of the patients in the waiting list. For example, in the Orthopedic Department of the HCU, each team has assigned two time blocks per week for the elective patients, so the difference of scheduling a patient in the first time block with the sixth one is 21 days. _Mathematical programming_ is an optimization technique [6] commonly used in managing hospitals [7], not only for surgery scheduling problems [8], but also for other problems such as bed management [9], nurse scheduling [10], or management policy decisions [11].