# Outpatient Appointment Optimization: A Case Study of a Chemotherapy Service
## 4 Mathematical Model
\begin{table}
\begin{tabular}{c c} \hline \hline
**Notation** & **Description** \\ \hline \(\mathcal{O}=\{A,B,C,D\}\) & Four operations of an appointment (Figure 3) \\ \(\mathcal{J}=\{0,1,2,\ldots,J\}\) & Set of days \\ \(j\) & Index of day \\ \(\mathcal{H}=\{1,2,\ldots,H,H+1\}\) & Set of time slots of a day (\(H+1\) indicates the end of day) \\ \(h\) & Index of time \\ \(M\) & Number of places \\ \(\Psi\) & Maximal number of patients that one nurse can monitor in the same time \\ \(D(j,h)\) & Number of doctors at time \(h\) on day \(j\) \\ \(l(j,h)\) & Number of nurses at time \(h\) on day \(j\) \\ \(F(j,h)\) & 1 if pharmacy opens at time \(h\) on day \(j\), \\  & 0 otherwise \\ \hline \(\mathcal{P}\) & Set of patients \\ \(i\) & Index of patient \\ \(\Theta_{i}=\{1,2,\ldots,n_{i}\}\) & Set of required appointments for patient \(i\) \\ \(k\) & Index of appointment \\ \(p^{o}_{i,k}\) & Duration of operation \(o\) for patient \(i\) at appointment \(k\) \\ \(c^{C}_{ijk}\) & Authorization of a priori drug mixing for patient \(i\) at appointment \(k\) \\ \(\Delta_{ijk}\) & Time-lag (days) of appointment \(k\) of patient \(i\) with respect to \\  & appointment \(k-1\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Notation of parameters. \[M\geq\sum_{i\in\mathcal{P}}\sum_{k\in\Theta_{i}}\sum_{h^{\prime} \preceq h}\left(\sigma^{B}_{i,k,j,h^{\prime}}-\chi^{D}_{i,k,j,h^{\prime}}\right) \quad\forall j\in\mathcal{J},\forall h\in\mathcal{H} \tag{22}\] \[D(j,h)\geq\sum_{i\in\mathcal{P}}\sum_{k\in\Theta_{i}}\sum_{h^{ \prime}\preceq h}\left(\sigma^{A}_{i,k,j,h^{\prime}}-\chi^{A}_{i,k,j,h^{\prime }}\right)\quad\forall j\in\mathcal{J},\forall h\in\mathcal{H}\] (23) \[I(j,h)\geq\sum_{i\in\mathcal{P}}\sum_{k\in\Theta_{i}}\sum_{h^{ \prime}\preceq h}\left(\left(\sigma^{B}_{i,k,j,h^{\prime}}-\chi^{B}_{i,k,j,h^ {\prime}}\right)+\left(\sigma^{D}_{i,k,j,h^{\prime}}-\chi^{D}_{i,k,j,h^{ \prime}}\right)/\Psi\right)\quad\forall j\in\mathcal{J},\forall h\in\mathcal{H}\] (24) \[F(j,h)\geq\sum_{h^{\prime}\preceq h}\left(\sigma^{C}_{i,k,j,h^{ \prime}}-\chi^{C}_{i,k,j,h^{\prime}}\right)\quad\forall i\in\mathcal{P},\forall k \in\Theta_{i},\forall j\in\mathcal{J},\forall h\in\mathcal{H} \tag{25}\]  
Since we aim to reduce the total waiting time of the patient in the hospital, the objective function is the total completion time minimization (10), expressed by Equation (9). We summarize here the explication of each group of constraints:  
1. **Operations:** (11) obligates any operation to start and end exactly _once_ on the horizon, according to (3). (12) makes each operation _non-preemptive_, which means that, once an operation starts, it must be processed without interruption. Equation (13) makes their start and end dates the same (outpatient regime). For each session, three stages (_consultation_, _installation_, and _administration_) are on a same day (14). However, since day 0 is a dummy day to allow for mixing the drug in advance, if possible, for day 1, these three steps are prohibited on day 0 (15). According to the order of operations, the _installation_ never precedes _consultation_ (16). The _mixing_, if a priori preparation is authorized (\(e^{C}_{ik}=1\)), can proceed at most one day before the day of treatment session (17); otherwise, it follows the end of _consultation_ (18). Finally, _monitoring_ starts when the patient has been fully installed (19) and the drug is available (20). 2. **Appointments**: Each patient has a set of appointments in which the time-lags have been decided beforehand in terms of days (21). 3. **Seats:** A patient occupies one seat from the beginning of _installation_ until finishing the _monitoring_ (22). 4. **Doctors:** One doctor takes in one patient at a time (23). 5. **Nurses:** A nurse can either install a patient into a seat or monitor a group of \(\Psi\) patients (24). 6. **Pharmacy:** Unlimited orders are allowed to process in parallel as long as the _mixing_ procedures are in the pharmacy's opening time (25).