Hidden chaos factors inducing random walks which reduce hospital operative efficiency

Operative parameters of La Fuenfría Hospital such as: hospitalized patients; daily admissions and discharges were studies for the hospital as a whole, and for each hospital’s service unit (henceforth called ‘services’). Conventional statistical analyzes and fractal dimension analyzes were performed on daily In-Patient series. The sequence of daily admissions and patients staying on each service were found to be a kind of random series known as random walks (Rw), sequences where what happens next, depends on what happens now plus a random variable. Rw analyzed with parametric or nonparametric statistics may simulate cycles and drifts which resemble seasonal variations or fake trends which reduce the Hospital’s efficiency. Globally, inpatients Rw s in LFH, were found to be determined by the time elapsed between daily discharges and admissions. The factors determining LFH R were found to be the difference between daily admissions and discharges. The discharges are replaced by admissions with some random delay and the random difference determines LFH Rw s. These findings show that if the daily difference between admissions and discharges is minimized, the number of inpatients would fluctuate less and the number of unoccupied beds would be reduced, thus optimizing the Hospital service.


Introduction.
The efficiency of a service providing institution depends largely on avoiding fluctuations between active and inactive periods.This is true for hotels, airplane companies, hospitals or any manufacturing production lines.Control and predictability rationalise costs and inventory expenses, this has long been known to proponents of total quality control management [1].
Hospitals in general, are service institutions which revive a random queue of service demanders (patients) whose admissions depends both on patient's availability and on hospital's capacity to attend or admit a patient.In a hospital operating at full capacity a patient must be discharged prior to the admission of a new patient.If a hospital is a part of a network of hospitals, the situation becomes even more complex, since it depends on hospital'scommunication between the discharge and admission and discharge sections/systems, and been hospitals in the network which transfer patients to another hospital.In the latter situation transportation between hospitals may be another factor depending on availability of a transport mean, or if this depends on the patient's on whether those resources are available, are available immediately or with some sort of delay.All this factors conform a complex set which determine hospital efficacy, and introduce complex non linearities in the system, and yet this non linearities, to our knowledge, are never considered when hospital efficiency is evaluated.
Non linear systems such as described in the preceding paragraph, are poor candidates to analyse with standard statistical means.This has been shown for may events such as earthquakes, wetter, adult and foetal hearth beat, epidemics, highway traffic, stock market fluctuations, machine failures and many more [2][3][4][5][6][7][8][9][10].Still, the common practice to evaluate an detect institutional efficiency (or lack of it) is generally limited to actuarial studies and some descriptive statistics loaded into administrative data bases.Budgets, personnel hiring, firing, promotions, demotions, and even hospital closures, may result based on these questionable analyses.This paper describes the analysis of of a real hospital, and benefits from the development of a simple algorithm [11] to estimate the Hausdorff-Besicovitch [12,13] dimension using a a variety of box-counting algorithm, the so estimated fractal dimension has been called with increasing frequency: "Sevcik's dimension" [14][15][16][17][18][19].Thus, from paper on, we will start calling "Sevcik's frctal dimension": D s since this actually avoids some formal mathematical confusions.Google Scholar1 [20] lists 152 cases of fractal analy, in many fields, up to November 9, 2020 [21] wit this [11] algorithm.
La Fuenfría Hospital (LFH, Servicio Madrileño de Salud, SERMAS) is a public mid and long term stay hospital [in the Madrid's (Spain) Autonomous Communality] for chronic patients.Spain has a life expectancy of 83.61 years (the 6 th longest in the world), and is growing at a 0.210% per year rate) [22].This fast growth makes Spain a candidate to become the country with world's longest life expectancy in the near future.
In 2019, Spain had a population of 46,738,578 inhabitants, and 26.5% (≈ 12.2 million)) are above 60 years of age (calculated based on [22][23][24][25]).One would then expect that hospitals for chronic diseases would have a significant and constant demand.Yet when La Fuenfría Hospital curve of patients staying al the Hospital (abbreviated InP) dring the period under (Figure 1A) LFH fluctuated between being completely full followed by periods with only ≈ 52% occupancy (the hospital has 192 beds).Analysed with classical administrative and statistical tools, this behaviour could be attributed to some kind of service demand seasonal periodicity or, even worse, attributed to administrative deficiency.The fact remains, that no matter what explanation is given, this behaviour is undesirable, reduces hospital efficiency, increases costs, and thus, the cause must be identified and eliminated as completely as possible.
Here we use fractal analysis, Fourier transforms,spectral analysis, and conventional statistics, to show that small hidden factors may have indeed a dramatic impact to reduce hospital's operative efficiency.

Statistical methods.
Medians and their 95% confidence interval (CI) were calculated using the nonparametric Hodges and Lehman method [26].Random distribution about the median (ŷ) was analysed with the above and bellow runs (one or more data appearing as a sequence above or bellow the median) methods of Mood [27] and Wilks [28,29].Gaussianity (also known as normality) was verified with the the Jarque-Bera [30], then robustified Jarque-Bera-Gel [31] and the Shapiro Wilk [32] tests.Linear regressions were carried out using the Theil nonparametric method [26] and correlations estimated with the Spearman rank correlation coefficient [26].Sequences were compared with the nonparametric Smirnov [33] test based on Kolmogorov statistics [34].The procures to generate random sequences to verify the differences between their fractal dimension were described elsewhere [11,[35][36][37] 2.1.2.Fast Fourier Transforms (FFT) and calculating spectral density.

Building the time series.
Series were built for La Fuenfría Hospital's admissions, discharges (Dis) and hospitalised patients, called "in-patients", and shortened InP in this paper.The Hospital depends on Autonomous Madrid Communality area Public Health System Network [Servicio Madrileño de Salud (SERMAS)] which, like most Spain, requires that all hospital information in the area is lodged into a central data base.In mid term stay hospital this information is kept using a program called SELENE © .SELENE © is jointly developed by UTE Siemens-INDRA [40].SELENE © keeps data in a central database for SERMAS.Data were retrieved from SELENE © as monthly spreadsheets for each kind of information, and were integrated in a single file covering our entire period of study for each kind of information.
To build the sequences for this study, we used data collected monthly as SELENE © Hospital's spreadsheet files called "Tablas de Mando" which we translate Command panels.In them, information appears as daily data for La Fuenfría Hospital from 5/1/2014 up to 12/31/2014, then they run from January 1 to December 31 for years 2015 and 2016, and from 1/1/2017 up to 12/19/2017.
Data was routinely hospital's statistics, was not recorded purportedly for this study, and we found transcription errors in the SELENE © -exported data base, which were dealt with as follows: January 1 st data corrections.An obvious error detected in the time series was that more than 900 admissions or discharges appeared for 1/1/2015 and 1/1/2016, an impossibility for a hospital with 192 beds.The source of such errors appearers to be a bug in the software used to gather data which did not evaluate the first datum of the year correctly.Those points were replaced by averaging December 31 of the previous year with January 2 of the current year, respectively.This error affected 2 out of 1329 days, or ≈ 0.16% of data.Missing data corrections.In Admissions (Adm) and Discharges (Dis) series we found a gap without information from 5/29/2914 to 6/6/2014 (both inclusive), in daily in-patient .This gap ( 9 out of 1329 days, or ≈ 0.67% of data) was closed filling the data on daily changes in the sequences for the gap days with a same value calculated as where dates follow the "mm/dd/yyyy" style, and the double headed arrow at left of Eq. ( 1) points at the limits of the gap to fill.In Eq. ( 1), as well as elsewhere in this paper, brackets are used to indicate sets.
Daily differences between Adm, Dis and InP.Once daily data admissions (DAdm), daily discharges (DDis) and daily in-patients (DInP) sequences were built, new series were developed by subtracting to each daily value, the immediately preceding day's similar datum.A set of sequences of daily differences with t = 0, 1, . . ., 1328 days, was built.In Eq. ( 2) each t is a given day, and ∆t = 1 is a one day time difference, the first day was arbitrarily taken as 0. The procedure was repeated for admissions, discharges and stays to obtain the corresponding daily differences sequences for the three kinds of parameters shown in Figures 2A and 2B.

Analysis of runs above and below the median.
During the period studied, the hospital's in-patients were 150 (149 -151) (median, ŷ , and 95% CI) ranging (102 -187) patients.Let us consider a random variable y = f (t) such that f (t) is independent from f (t − ∆t) or from f (t + ∆t) (where ∆t is a short time lapse, ideally ∆t → 0).In other words, a variable for which its present is independent from its past, and whose present does not determines the its future.Such variable produces a sequence of data which are uniformly distributed about their median ŷ.We say that run occurs when one or more sequence points fall above or bellow the median, this is easily grasped by looking at Figure 3.In Figure 3C there are 5 runs, and in Figure 3D are 9 runs.Points that are equal to ŷ are not taken into account in the analysis.Figure 3 presents four sets of monthly averages from the Function Recovery Uunit (FRU).Figure 3A, results from the total of admitted patients (Adm) sequence  15), for all sequences N = 1329.Labels mean: InP,in patients at La Fuenfría Hospital (Fig. 1A); Adm, admissions to La Fuenfría Hospital ( Fig. 2A);Dis, discharges from La Fuenfría Hospital (Fig. 2D) ; InP, daily sequence of in-patients (Fig. 1A); DInP, InP daily variation ( Fig. 1B) ; DDiAd, Adm-Dis (Fig. 1D); Ξ i , Rw built for DDiAd curve in Fig. 1E using Eq. ( 5); Brownian noise, Brownian noise calculated as indicated in Sub-Section 4.0.4 and Eq. ( 7).White noise, White noise calculated as indicated in Sub-subsection 4.0.4.§ superscript, indicates that D s is the average of M = 100 sequences with N = 1329 evaluated with Eq. ( 9), total variance was calculated with Eq. ( 18). .
(n = 22, n runs = 11, probability of random run distribution about the median P rrd is ≈ 0.15); 3B, Total discharged patients' (Dis) sequence (n = 22, n runs = 8, P rrd ≈ 0.04); 3C, is the sum of lengths of stay (LoS) for all in-patients (InP) in the Unit during each month (n = 23, n runs = 5, P rrd ≈ 4.5 ⋅ 10 −4 ); 3D, is a sequence of the average stay duration (Mean LoS) of each in-patient at the Unit (n = 23, n runs = 10, P rrd ≈ 0.13); 3E, along de observation period the Function Recovery Unit gained relevance and the number of beds were increased, panel shows the changes in beds at the benign in several months, as expected, the analysis of this sequence was found to be non random (n = 23, n runs = 5, P rrd ≈ 4.5 ⋅ 10 −4 ), actually n runs may be just 3 in this case, the algorithm probably found very minor decimal differences between data 3an ŷ in one segment; if n runs = 3, should n runs be 3 then P rrd ≪ 4.5⋅10 −4 .P rrd s are probabilities (obtained with the Wald-Wolfovitz test) that the sequences are not randomly distributed about their medians.In all cases abscissa is month number in the study period (January 2016 = 1, November 2017 = 23).Out of these P rrd values the only one indicating a statistically significant non zero number of runs, occurs for InP sequence in 3C [41,42].The nonrandomness of sequence 3C could have several reasons, one of them is some kind of 'periodicity' (a strange one, since its period would be longer that 2 years), but it could also stem from some kind of random walk.During the period studied, the hospital's in-patients were 150 (149 -151) (median, ŷ , and 95% CI) ranging (102 -187) patients.Let us consider a random variable y = f (t) such that f (t) is independent from f (t − ∆t) or from f (t + ∆t) (where ∆t is a short time lapse, ideally ∆t → 0).In other words, a variable for which its present is independent from its past, and whose present does not determines the its future.Such variable produces a sequence of data which are uniformly distributed about their median ŷ.We say that run occurs when one or more sequence points fall above or bellow the median, this is easily grasped by looking at of each in-patient at the Unit (n = 23, n runs = 10, P rrd ≈ 0.13); 3E, along de observation period the Function Recovery Unit gained relevance and the number of beds were increased, panel shows the changes in beds at the benign in several months, as expected, the analysis of this sequence was found to be non random (n = 23, n runs = 5, P rrd ≈ 4.5 ⋅ 10 −4 ), actually n runs may be just 3 in this case, the algorithm probably found very minor decimal differences between data 3an ŷ in one segment; if n runs = 3, should n runs be 3 then P rrd ≪ 4.5 ⋅ 10 −4 .P s are probabilities (obtained with the Wald-Wolfovitz test) that the sequences are not randomly distributed about their medians.In all cases abscissa is month number in the study period (January 2016 = 1, November 2017 = 23).Out of these P rrd values the only one indicating a statistically significant non zero number of runs, occurs for InP sequence in 3C [41,42].The nonrandomness of sequence 3C could have several reasons, one of them is some kind of 'periodicity' (a strange one, since its period would be longer that 2 years), but it could also stem from some kind of random walk determined by the uncertainties in n j and LoS i , j [11,37,43].It is difficult to prove, but the apparent 'seasonality' was probably determined by the increase in Unit's bed capacity depicted in panel 3E.The figure illustrates that relatively simple sequences of random variables having unknown pdfs such as n j and LoS i,j , may interact in strange manners to produce apparently les random "simi-periodic" sequences such as figure 3C.determined by the uncertainties in n j and LoS i , j [11,37,43].It is difficult to prove, but the apparent 'seasonality' was probably determined by the increase in Unit's bed capacity depicted in panel 3E.The figure illustrates that relatively simple sequences of random variables having unknown pdfs such as n j and LoS i,j , may interact in strange manners to produce apparently less random "simi-periodic" sequences such as figure 3C.
4.0.1.La Fuenfría Hospital data statistical characteristics.Figure 2 presents sequences built in the preceding Subsection 2.2.Panels 2A (Adm) and 2C (Dis) are sequences with a few negative, artefactual (see Subsection 2.2), outliers.Panels 2B and 2D are the same data with the scale magnified to see the positive part and better appreciate data detail when y t ⩾ 0.
Testing with the Jarque-Bera [30], the robustified Jarque-Bera-Gel [31] and the Shapiro-Wilk [32] tests, we found that none of the data sequences collected during the study period from La Fuenfr´ía Holpital, were Gaussian (also called normal) variables, (Probability of Gaussianity, P ≪ 10 −6 ).InP sequences contained a large number of ties (points with same value).In ti InP sequence every value is repeated In the expression: InP max , is InP's maximum values; InP min , is InP's minimum values and n total , is total number of points in the sequences.Given the narrow range there are only 187 − 102 = 85 possible different values among 1329 integer data in the series, they are not all equally likely.Please notice that the number of ties increases as InP range → 0, that is the more uniform bed occupation gets, the larger the number of ties, in the InP sequence, will get.This is to be expected when integers are sampled in a narrow range, under these conditions any statistical test, parametric or not, must be taken with caution, since test power decreases wit ties.Tie corrections were used for the nonparametric statistical procedures employed here [26].Since the Hospital has 192 beds, data indicate that the Hospital operates with some leeway, having an occupancy ranging from 53.1 to 97.3%, with a 78.1% median.
With the data in the sequence of InP (shown in Figure 2A) and Eq. ( 2) a curve of DInP at the Hospital was built, this is shown in Figure 1B.The sequence in Figure 1D was obtained by subtracting to each Adm the same day Dis. Figure 1D presents a sequence obtained by subtracting Dis -Adm (DDiAd) to the Hospital.
A direct visual comparison between sequences in Figures 1B (DInP) and 1D (DDiAd) shows, that in spite of some differences, they are similar, and very different from the series in Figure 1A (InP).Sequences in Figures 1B (DInP) and 1D (DDiAd) compared with the Smirnov test had the same distribution, that is, their distributions are statistically indistinguishable (Probability of identity P ⪅ 1, n = 1329, two tails).Yet, when Smirnov test was used to compare sequences 2A and 2C, admission (Adm) and discharges (Dis) sequences were found to be highly statistically significantly different (Probability of identity P ≪ 10 −6 , n = 1329, two tails).
Empirical Hospital occupancy Probability Distribution Functions (PDF) [28] calculated from these data is shown in Figure 4. Daily hospital occupancy data set was found to be not Gaussian when tested with the Jarque-Bera [30], then robustified Jarque-Bera-Gel [31] and the Shapiro Wilk [32] tests (P ≪ 10 −6 , in the three cases).The perception of these data lack of Gaussianity becomes intuitive when data (dots) are observed very dispersed around a Gauss pdf line in the same panel.The Gauss pdf line (shown also as pdf, in Figure 1C) with the same mean (ȳ) and variance [s 2 (y)] as the set of 1329 data points forming the sequence in Figure 1A ( [44] calculated for in-patients (InP), admissions (Adn), discharges (Dis) and difference between Adm and Dis: (DAdDis).It is perhaps good to point out that Adm and Dis were were logged daily as separated entries in Hospital's Command Panels.Data in Figure 4 (especially the expansion presented in 4C) indicates that daily DInP is distributed following the same PDF as DAdDis, but that Adm and Dis have different PDFs.The largest difference is observed for probabilities of no admissions (blue line in 4C) and no discharges occur (red line in 4C) in a given day (at zero value in the abscissa in Figure 4C), it is a day without admissions 30% likely but a day without discharges is only 20% likely.When the abscissa is > 0, the probability of daily admissions is surpassed by daily discharges.The largest difference between the curve predicted determines the significance of the difference between two PDFs by using the Smirnov test [33,45] (based on Kolmogorov statistics [34]).Yet from looking at Figure 4C, it is evident that this is not the only difference between the curves.There are two curves particularly relevant for the analysis of sequences in Figures 1 and 2, they are the, so called, white and Brownian noises [43].In white noise every point in the sequence is independent from de past, and does not determine the future of the system.In brown noise, every point is dependent on the past and determines the future, but in in unpredictable manners.
White noise properties.White noise is a sequence of independent random variables, no value is predictable nor dependent on on any prior or posterior value in the sequence.White noises have a fractal dimension D h = 2 [11,37,43].On a first look, a white noise curve looks very similar to sequences in Figures 1B and 1D, the random variable producing each point may have diverse PDFs, white noises are randomly distributed about 0, when N → ∞ white noise variables in a sequence produce N  2 + 1 runs [46].When subject to Fourier transformation [47] white noises have a constant spectrum for all frequencies between 0 and ∞, reminding white light which contains all visible electromagnetic frequencies, leading to call this noise white.
Brownian noise properties.Brownian noise is also called Brown noise [48,49], red noise or random walk (Rw) [43].For Brownian it noise always holds that where υ(µ = 0, σ 2 ) is a random variable with mean µ = 0 and variance σ 2 .Variable υ may be a uniform U[-1,1] pdf, like But very often the variable is a Gaussian (also called normal ) of the kind N(0, σ 2 ) having mean µ = 0 and variance σ 2 [11,43].Brown noise is a particular case of processes called Markov chains [50], specially important in the so called waiting time theory witch studies situations with repressed queues waiting to get some service [51,52].In layman's language, Brownian variables strictly depend on their past, yet they are random, it is impossible to predict their future or estimate their past values.Even though, their current value depends on their past, and their future value depends on the present.Brown noise in hospital parameters is not unexpected, the admission of a patient depends on bed availability, the amount of beds depends on many criteria of the public health system.Availability also depends on demand, the disease a patient using the bed suffers, the efficiency of doctors in the hospital, treatment availability and so on.Brownian noise is characterised by wide and slow variations, and has fractal dimension D h = 1.5 [Eq.(11)] and so does D s [Eq.( 14)] when N → ∞ [43].Brownian noise distributes around its median (which is not necessarily 0) resulting in a number of runs ≪ N 2 + 1.

4.1.
Fractal analysis theory of sequences studied here.
As shown in Subsection A.1, in contrast with other methods to estimate the fractal dimension D h , Eq. ( 14) is extremely easy to calculate and certainly converges towards D h as N → ∞, yet though nobody knows how far infinity is for certain [53], we all belie it is far away.Fractal series studied here have an extent which is hard to classify.An N = 1329 points may be long or short depending in somebody's point of view, it seems large for conventional statistics, but is short when considered in fractal analysis context [37].A D s value deduced from a 1329 points series underestimates sequence D h significantly.There is a four step solutions for this: 1. Generate a significant number of sequences with the characteristics of interest using Monte Carlo [54] simulation.2. Calculate their D s and var(D s ) [Eqs. ( 14) and ( 15)] [11].3. Calculate the set of traces' mean D s and its variance including variance between simulated traces as indicated in [11,[35][36][37].4. Compare real and simulated sequences parameters using the Vysochanskij-Petunin inequality (details Subsection A.6 and in [35,37]).

4.2.
Fractal analysis of sequences from La Fuenfría Hospital.4.2.1.Ruling out sources of arrow in sequences.
To analyse data in Table 2 we must take into account the transcription data errors in the SELENE ® data base and how were they corrected for this study, as indicated in Subsection 2.2 and the problem of ties mentioned in Sub-Subsection 4.0.1, also the narrow data rage determines further underestimations of D h .
A case random noises in found in [37] where much longer sequences needed for D s to converge towards D h , these sequences contain only decimal digits {0, 1, . . ., 8, 9} ∈ Z, not real numbers {−∞ < x < +∞} ∈ R. Empiric data on Tables 1 and 2, may differ from D s of a calibration white noise from a longer sequences.

Estimates of the fractal dimension.
D s values estimated for Hospital sequences in Figures 1 and 2 are given in Table 1.White noise standard set of 100 series with 1329 point s had an estimated D s = 1.5983 ± 0.0104 Ds ± s( Ds ) ; while the Brown noise standard set of 100 series with 1329 points had D s = 1.2885 ± 0.0384 Ds ± s( Ds ) . 1. D s values calculated or several white and Brown noises, as well as for La Fuenfría Hospital parameters discussed previously, are summarized in Table Table 1, and P values to test statistical significance of differences between them appear in Table 2.An asterisk indicates marginally significant P which could have been more significant if we knew D s 's and the Vysochanskij-Petunin inequality would not have been needed to test for significance [55,56], we consider this cases as of undecided significance.

Statistical compassion of D s values appearing in Table
In-patients sequence D s (InP , Tables 1 and 2, and Fig. 1A) is not statistically different from from Brownian (P > 0.13).An asterisk indicates marginally significantP which could perhaps have been more significant if the Vysochanskij-Petunin inequality use would not have been necessary [55,56] due to the, we consider this cases as of undecided significance.
An interesting case is the Rw Ξ i (Figure 1E) built for DDiAd (Figure 1D) using a recursive relation Please note the resemblance of sequence Ξ i (Fig. 1D) and sequence in Fig. 1A .Eyeball inspection of these two series shows tiny differences, yet estimates of their fractal dimension presented in Table 1 are not identical, D s for InP sequences is 1.33806 ± 0.0032 Ds ± s( Ds ) calculated with Eqs. ( 14) and ( 15), respectively, and is 1.33922 ± 0.00382 for the Ξ i sequence (N = 1329 in both cases).Fig. 1A and Fig. 1E are not identical, but yet their D s values are statistically indistinguishable using Vysochanskij-Petunin [See Equation (31) which indicates that Theorem 1 does not hold to this case, and that Vysochanskij-Petunin inequality, strictly, cannot be used to asses P (∆D s ).Yet by virtue of Corollary 1 Eq.( 32) indeed P ≫ 1 6 ≊ 0.1 6 for ∆(D s ) = 0 occurs per chance: i.e., it is not statistically significant [41,42,57].
∴ The InP Rw fluctuations were a result of delays between daily Hospital's discharges and admissions.

Monte Carlo simulated sequences.
White Gaussian noise in Figure 5A is a sequence of {g i = N(0, 1)} i=1,2,...,10 4 and 5C of {g i = N(0, 10 −4 )} i=1,2,...,10 4 .Brownian noise in Figure 5B is the result of where b i is the i th point in Figure 5B and g i−1 is the (i − 1) th point in Figure 5A.The required random normal variates of type N[0, 1] were generated as indicated in Section A.4.In contrast Statistic significances: calculated using Eq, ( 29).Labels mean: InP,in patients at La Fuenfría Hospital (Fig. 1A); Adm, admissions to La Fuenfría Hospital (Fig. 2A); Dis, discharges from La Fuenfría Hospital (Fig. 2D); InP, daily sequence of in-patients (Fig. 1A); DInP, InP daily variation ( Fig. 1B) ; Ξ i Rw (Fig. 1E) built using Eq. ( 5); Bro, Brownian noise calculated as indicated in Sub-subsection 4.0.4 and Eq. ( 7).Whi, White noise calculated as indicated in Sub-subsection 4.0.4.§: D s is the average of M = 100 sequences with N = 1329 evaluated with Eq. ( 14), total variance was calculated [11,37]; ‡, are values having borderline significance, but that could more significant if the pdf of data would have been known and the Vysochanskij-Petunin inequality use would had not been necessary, we call them 'undecided significance'.: Referred to Corollary 1 for Theorem 1.
with the Gaussian white noise (Figs.5A and 5C), Brownian noise sequences have slow and fast meanders and relatively long periods with trends to increase and/or to decrease which are just local tendencies in the segment that we happen to observe (Figs.5B and 5E), they do not represent any periodicity of the system.Segments like the one in Fig 5B for 7 ⋅ 10 3 ⩽ x ⩽ 10 4 look very much like the InP curve at La Fuenfría Hospital in Figure 1A which also produces a false sensation of periodicity with a slight tendency to decrease, but are just chaotic trends, in spite of the fact that the underlying random process (Figs.1A, 5A and 5C) have no periodicities at all.A Rw expresses a system out of control, just like epidemics [7,11,43], storms [2,[60][61][62][63] or earthquakes [64], which if described with statistical parameters based on a (short) periods of time leads to wrong conclusions.

Power spectrum analyses.
A classic form to show function periodicities in time domain, is to transform it them into frequency domain function, which is a sum of sines and cosines, using a fast Fourier transform (FFT) [39,47].Transformed values for each frequency (f ) are 'complex numbers' (C), c f comprised of two parts or components: one is some times referred to just the 'real component a f ' (R) and a, so called, 'imaginary' (I) component (b f √ −1).A complex number (c f ) is then of the form where parentheses indicate sets of numbers, and ∈ reads as "belongs to".The 'energy', expressed as either a steady curve's non zero curve values, or sharp increases or variations in amplitude (such a as the peak in Figure 6B, something we could informally call its 'weight'), contributed by each frequency component to total signal energy in a fluctuating complex process is given by plotting ψ f against f id called a spectral density plot, and it is areal number.An intuitive manner to understand this, is to consider a perfect periodic signal such as a trigonometric sine function like ζ(x) = sin( 2xπ T ) where π = 3.1415926 . . .and T is a constant (called the waveform's period ) with same units (meters, seconds, grams, volts, or else) as x.The example is show in Figure 6A. Figure 6B, presents Figure 6A's power spectrum consisting of a single peak f = 1 T frequency.Please notice that to calculate ψ f the actual signal is sampled in ∆x intervals (equivalent to multiplying by something called a Dirac comb and the FFT also contains the frequency components of the Dirac comb producing a burst of rapid vibrations in the right half of each trace [39]. Figure 6C is a ψ f spectrum of the Gaussian white noise shown in Figure 5A; ordinates of panels B through E, in arbitrary units.In Figure 6C it is seen that all frequency have the same 'weight', i.e., all frequencies contributions are equal.Figure 6D is a Brown Rw ψ f spectrum, ; in double logarithmic coordinates, the spectral density is a straight line which decays with a slope of 6E is ψ f of daily in-patients (InP ) sequence shown in Figure 1A.
Although the simulated sequences in Figure 6 are 10000 points long and Hospital data are only 1329 points long, there is an evident similarity between the Brownian noise ψ f (Fig. 6D) , and  5B; Panel Eψ fj pf daily in-patients (InP ) sequence which in appears in Figure 1A.Ordinate of panels B through E, is power dissipated at each frequency.The sine function depicted dissipates all its energy at a single frequency observed at a single neat peak in its ψ j (panel B).The number of hospitalised patients sequence SDf j corresponds to a Gaussian Rw without any underlying periodicity.All SD plots were filtered using a Hann window [39,65] ψ f from the sequence of Hospital in-patients (Inp) between May 1 2013 and December 19 2017 (Figure 6E).In both cases ψ f are characteristic of a Brown Rw and none of these ψ f s has a peak which could indicate a predominant periodic component which could suggest for any periodicity, in spite of short lapses in the Brown Rw s that could give this impression.
Figure 6C is Gaussian white noise ψ f j calculated for the signal in Figure 5A.In Figure 6C all frequencies have the same 'weights', all frequencies contributions are equal, which leads to the 'white' name of this kind of noise.Figure 6D shows ψ f j of the Brownian Rw in Figure 5B, it may be seen that in double logarithmic coordinates the spectral density follows a straight line which decays with a slope of 1 f 2 .Finally, also in Figure 6E, we show ψ f j corresponding to daily hospitalised patients sequence shown in Figure 1A.Except for that simulated sequences in Figure 6 are 10 4 points long and Hospital data are only 1329 points long, there is an evident similarity between the Brownian noise ψ f j , and that ψ f j from the sequence of Hospital discharges between May 1 2013 and December 19 2017.In both cases ψ f j are characteristic of a Rw and none of these ψ f j has no peak which could suggest periodic components which could account for any periodicity, in spite of short periods in the Rws that could give this impression.

Daily fluctuations in stay duration and average stay duration in operative units at La Fuenfría
Hospital.The Hospital is divided into the following Clinical Operative Units (COU): RCPU, Relapsing Chronic Patients Unit, this unit operated until May 2016 when its beds are transferred to CCU; Chronic Care Unit; PCU, Palliative Care Unit; FRU, Function Recovery Unit; TU, Tuberculosis Unit and NTU, Neurorehabilitation Treatment Unit. Figure 7A presents data on daily number of in-patients (InP ) at each unit, and their average stay duration on Panel 7B).Daily fluctuations of in-patients and average length of stays (LoS) for each COU calculated every day from January 1 2015 uo to December 12 201.Abscissas are days from January 1 2014, ordinates are in decimal logarithmic scale to better visualise some of sequence large outliers, which are particularly evident in Panel 7B.Traces in Figure 7 seem some kind of Rw.All have some outlying peaks, particularly RCPU and UTB, but, less prominent, occur in other COU too.It must be pointed out that in this paper we some times refer to products or quotients between random variables, this is the case of averages including number of patiens and stay duration in each COU in Figure 7B.We know that our data are not Gaussian, but even in the case of Gaussian values these averages, may be quotients of random variables following a a "pathological" statistical distribution such as the Cauchy pdf (See Subsection A.5). 7 " If a sample is too small you can't show that anything is statistically significant, whereas if sample is too big, everything is statistically significant." . . ." you are doomed to significance."Norman and Streiner [71,pg. 24].

Operative units nonparametric descriptive statistical analysis of sequences in Figure
As said in Section 4.4 sequences in Figure 7B include data such InP average patients' stay Sequence of InP: number of in-patients in the Unit.Υ d sequences are: average stay duration at each Operating Unit [defined as in Figure 7 by Eq. ( 10)].Data presented as medians and their 95% Confidence Interval (between parentheses), α regression line value when x = 0 (intercept), β straight line regression coefficient (slope), ρ S nonparametric Spearman [70] corelation coefficient, P is the probability that each sequence comes from a population with es ρ S = 0, usually called the probability that the correlation is not statistically significant, and N is the number of data pairs used for the linear regression analysis.HLF unit initials mean: RCPU, Relapsing Chronic Patients Unit, this unit was suppressed on May 2016 and its beds were transferred to CCU; CCU, Chronic Care Unit; PCU, Palliative Care Unit; FRU, Function Recovery Unit; TU, Tuberculosis Unit; NTU, Neurorehabilitation Treatment Unit.
duration in each operative unit (Υ).This number calculated as: where d represent a given period and j is the j t h patient in the service, and N d is the number of patients in each service at day d.Thus, Υ d are quotients unknown distribution random variables.As mentioned in Section A.5 those quotients of random variables have uncertain distributions, which in case of Gaussian variables is the Cauchy pdf Eq. ( 24) discuses in Section A.5.These quotients follow unknown pdfs when terms in the ratio obey unknown pdfs.For these distributions x n and s 2 (x) are meaningless.Statistical sampling theory is base on the fact that sample mean (x) and variance [s 2 (x)] converge towards population values such a µ, the population's mean, and σ 2 , the population's variance.But µ and σ 2 do not exist for Cauchy and other, so called, "pathological distributions" for which x and s 2 (x) have nowhere towards to converge to.Cauchy sample experimental estimates of x and s 2 (x) vary wildly, specially when sample sizes grow and large outliers outliers values become very likely [72,73].Due to these only nonparametric descriptive analysis provides meaningful information on sample localization and dispersion.A caveat is due here, data samples from La Fuenfría Hospital, except for data in Figure 3, are rather large (986 ⩽ N ⩽ 1434).Under these circumstances small, but statistically significant changes, which lack relevance or meaning in practice, may be detected, [69,[74][75][76].Table 3 contains results where sequences in Figure 3 are subjects o a nonparametric Theil regression analysis [77].As seen in Table 3, many of the hospital units sequences in Figure 6 seem to produce a small, but highly statistically significant, correlation between the sequence under study and time.All time series in this figures are Rw s (not shown), as was confirmed by their spectral density, characteristic of Brownian noise, without any evidence of periodicity, and resembling those in Figures 7D and  7E.As said in connection with the sequence in Figure 5B and 5D, Rw s may exhibit, some times rather long, trends to increase or to decrease, that are independent from any variation in factors determining the Rw.The pdf of ∆yt = y t − y t−∆t does not change in those periods,.Due to these meandering of time sequence, descriptive statistics parameters, even if optimally chosen, like in Table 3 fail to provide meaningful information on Rw s like Figure 6B and some of the preceding figures.

Meaning of a process' lack of control.
Data on Figures 1A and 6E reflect that Hospital bed occupancy is described by a random fractal function, the so called Brownian Rw.Just like Brownian Rw, bed occupancy fluctuates with important periods of low occupancy.
The main characteristic of Brownian Rw. is that its complexity (reflected in its D s ) does not change if daily in-patients (DInP) increases or decreases, this is called self affinity of the process [7,43], it does not change with scaling DInP.This is shown by the Monte Carlo simulated traces of Figure 5 where the Gaussian white noise {g i = N(0, 1)} i=1,2,...,10 4 in panel 5A looks very similar to the {g i = N(0, 10 − 4)} i=1,2,...,10 4 white noise in panel 5C, exp of course for the ordinate scale; Something similar happens with the associated Brownian noises in panels 5B and 5D, which have similar complexities, but the fluctuations in Panel 5B are approximately 10 times wider in than in Panel 5D.
Still, from a production efficiency view point if the differences ( in Figure 5) are very important since the fluctuation range of the Brownian Rw diminishes when g i → 0 and production of goods or services increases as the system becomes more predictable (controlled), uniformly productive and efficient.
In La Fuenfría Hospital InP would fluctuate less if the lag between Adm and Dis → 0. To identify a problem is to start solving it.This means, making the Hospital more efficient requires to analyse the factors that keep Adm and Dis out of synchrony.[78].

Hospital La Fuenfría Characteristics
Hospital La Fuenfría (https://bit.ly/32FVmyf)tougher with Virgen de la Poveda Hospital and Guadarrama Hospital is one of three medium and long stay SERMAS hospitals in Madrid's Autonomous Communality (MAC) Sanitary Chancellery (Consejería de Sanidad ), it is localised in Cercedilla Municipality at the north of Madrid Communality, at 60 km from Madrid city.The MAC comprises an area of of 8021.8 km 2 and a population of 6.6 M.
The long durations of stay are related to local norms and procedures to handle patients, it is likely that in Spain the public health system has more leeway to tolerate longer stays than perhaps other nations in the EU, specially when dealing with needy patients.Yet, LFH is a place to deal with chronic cases, and it most important unit is FRU, responsible for recovering patients with disabilities stemming from bone surgery (prothesis, fractures, etc.) and motor deficiencies following cerebrovascular accidents (CVA or ictuses).Thus perhaps it is to be expected that stays at LFHa may be longer than in hospitals dealing under ambulatory treatment.
LFH is located in a pleasant rural area, Madrid's Sierra de Guadarrama, convenient for its goals, but distant from Madrid (population 3.3 M) city and MAC, in general.Patients are referred from other SERMAS hospitals, thus, delays between LFH discharges and new patients arrivals, are not surprising.The analyst of data in this paper (CS) was completely unaware of this factors, but they popped out sharply from data analysis discussed here.

Classical statistical analysis of institutional efficiency.
Descriptive statistics, usually using parametric (Gaussian) methods are the most common manner employed tools to gauge institutional efficiency.LFH SELENE ©' include command panels parameters that are ratios of random variables.Those ratios follow unknown statistical distributions which like the Cauchy pdf, have no central moments, mean or variances do not exist, thus textbook recipes like for sample mean and variance, are, calculable but, absolutely meaningless [79][80][81][82](See Section A.5).For these kind of random samples the use of nonparametric statistical estimators such as medians and 95% CI must always be preferred to x and s 2 (x) which, are also, very sensitive to outliers and, as said, are meaningless for Cauychyan variables.Furthermore, in the analysis of data extracted from LFH command panels, we found no Gaussaian variables (Sub-Subsection 4.0.1),further demanding the use of nonparametric statistical methods.
Another example of statistics failure to productively help to analyse aspects of LFH operative efficiency may be derived from Figure 7.The figure presents unit operation data are Rw s with large outliers.But when these Rw were subjects of linear nonparametric regressions (Table 3) and apparent correlations with time appeared, with correlation coefficients statistically distinct from zero, i.e. apparently highly unlikely to differ from zero per chance.Large samples are are good way to discover statistically significant, but irrelevant, trends, which , as shown here, may just temporary tendencies of a random walk.Such correlations could be used to create institutional (probably wrong) operation policies.Classical statistics is notoriously limited to study fractal processes [4,7,35,36,43,83].So, of our findings regarding statistical evaluation of LFH operational curves is neither new nor really surprising.The novelty of our findings relates to the commonality of statistical analysis and the lack of other analyses (fractal or else) to study institutional efficiency.
Several couple of caveats are needed here.
1.This communication is centred on maximising the use of hospital facilities as an indication of efficiency.Yet, it does not take into account other criteria such as patient's welfare, degree of recovery , speed of recovery, which are of fundamental importance, but also depend on efficient hospital resources use.2. The many theoretical tool we use is fractal analysis, but to accurately estimate fractal dimension very long data series [11,37,84].this limitation, as done here, may be overcome py the use of sequences having known fractal dimensions as done here an in [11,37].3. Spectral analysis confirmed the lack of periodicity in the InP time series.4. Yet, the most important finding reported here is that that the wide fluctuations observed in the in-patients (InP, Figure 1A) may be reconstructed with identical naked-eye and fractal properties (Ξ i sequence in Figure 1E) by adding the daily differences in LFH patients admitted and discharged (DDiAd, Figure 1D) using Eq. ( 5).These are empirical finding no possible to result from any mathematical theory or artefact.

Rw in La Fuenfría Hospital operation curves.
The most surprising finding in this study, is that curves representing in-patients, InP, and ∆InP are random Markovian processes [50].In a Markovian processes past determines what happens now, and what occurs now decides the future.If there were no random components in the sequence, known the present would allow to know past and future of the system.But since uncertainty separates an instant from the next, the whole system becomes unpredictable.It dt drifts over time in ways that a naive observer of a short span, is driven to believe that the system is predictable and determined.
If a present drift trend pleases us, we tend to believe that what ever we are doing is "correct", in the opposite case we would tend to believe that we are doing something "wrong", even if in reality we have no "merit" in the first case nor are we "guilty" in the second case.Examples of this are seen at times from 0 to 6000 in Figure 5B.But after that time the Rw in Figure 5B which produces a false appearance of relative "stability", even when actually at all those times is exactly the same system under the same {g i = N(0, 1)} i=1,2,...,10 4 Gaussian conditions as shown by the plot in Fig. 5A.5.5.Some suggestions to improve performance.

Detecting problem indicators.
Descriptive statistics limitations mentioned in section Subsection 5.4 open a question on how to evaluate and optimise La Fuenfría Hospital operation and administration whose operation curves are Markovian random walks.
Random walk curves meanders reduce system efficiency.In a hospital performance case, low occupation inefficient periods.
1.The population demanding service do not gets it.
2. The cost of operating the hospital (infrastructure, salaries, etc.) are wasted at low occupancy periods.
At la Fuenfría Hospital low occupation got as low as 45% (Figure 1A) of its capacity.As discussed in Section 4.0.1 oscillations between full and partial occupation seem related to a daily lag between Admissions and Discharges.The analysis indicates that should this lag be eliminated fluctuations in occupancy would disappear.
During the period of this study the mean number of LFH in-patients was InP = 149.2almost identical to its median InP = 150.0,and ranged (102, 187).Since the hospital had 192 patient's beds, thus the bed occupancy during the study period was x = 77.7% and a median of x = 78.2ranging (53.1, 97.4)%.Thus over the observation period, on average 22% ranging (3, 47)% La Fuendría Hospital beds were vacant, which means that a similar proportion of the recurses assigned to LFH were lost, and this thus not generates in lack of demand.

Is it possible to solve the problem?
Our study indicates that LFH vacancies could be eliminated or greatly reduced if the daily difference Adm−Dis is annulled (Subsection 5.1, Figs. 2 and 5).Efficient service by an institution characterised by a Rw in time may be increased by reducing broad meanders of the walk (Fig. 5).In case of La Fuenfría Hospital this study suggests that the key factor reducing efficiency is the the daily difference between admissions and discharges.An improvement in synchrony between people in charge of both processes could help a lot.
Yet, the solution probably transcends, La Fuenfría Hospital realms.We have no information on other SERMAS hospitals, but the description of LFH made at the Section 1 illustrates, LFH is interwoven in the SERMAS network, thus it seems necessary to consider, and modify communications within the network.The essay part may be to improve communications between admission and discharge department within LFH, although this may imply some changes to the internal computer network making, if possible, that the admissions department to get notice ahead of the actual discharges in order to transmit to the SERMAS network that LFH will have space for a new patient to have it ready to occupy the space immediately when it actually becomes available.
But this immediate availability is also hindered by the large area SERMAS covers, the fact that there is a 60 km distance from Madrid city (the largest set of SERMAS patients), and even more from other areas in Madrid's Autonomous Communality.Factors such as means and speed of transportation may be critical, institutional transportation within SERMAS network is probably faster and easier to program, than to solely depend on the patient's and its family's resources and efficiency, for example.But if the efficiency of SERMAS hospitals is affected to the same extent as La Fuenfría Hospital's, it may be well worthwhile to study the system and to implement solutions between admission and discharges in SERMAS hospitals to improve the system's efficiency.Classical (Euclidean) geometry is useful to describe relatively simple forms such as straight lines, squares, circles, cones, pyramids, etc.All these forms may be represented as a linear combination of an integer number of orthogonal components called Euclidean dimensions.One-or two-dimensional Euclidean spaces are subsets of our sensory tri-dimensional space.Yet, almost all natural forms cannot be represented in terms of Euclidean geometry.
According to Mandelbrot [7, pg. 15 and Ch.39]: "A fractal is by definition a set for which the Hausdorff-Besicovitch dimension strictly exceeds the topological dimension.Every set with a non-integer D is a fractal." The Hausdorff-Besicovitch dimension of a set in a metric space may be expressed as [7]: where N(ǫ) is the number of open balls or radius ǫ required to cover the set.In a metric space given any point X, an open ball centred on X with radius ǫ, is the set of all points x for which distance between X and x is < ǫ.
The term waveform is applied to the shape of a set, usually drawn as instant values of a periodic quantity in time.Besides classical methods such as moment statistics and regression analysis, properties like Kolmogorov y Sinai entropy [85], apparent entropy [4,86,87] and fractal [11] have been proposed to analyse waveforms.Fractal analysis may provide information on spacial extent (tortuosity or capacity to extend in space) and on self-similarity (the property of staying unchanged when measure scale changes ) and self affinity [88].In bidimensional spaces waveforms are planar curves, which may have coordinates of different units or dimensions.
There is a simple algorithm to approximate fractal dimension of a curve [11].To achieve this, fractal dimension D s is estimated for a set of N points from a set{x i , y i } i=0,1,2,...,N values were the abscissa x i increases by a constant factor (∆x).The curve is transformed into a unit square (a square with side length equal to 1) [11] as follows.A first transformation normalises every abscissa point as: where x i s are the original abscissa values, x max is the largest x i .A second transform normalises the ordinate as: y * i = y i − y min y max − y min (13) where y i are the original ordinate values, and y min and y max are minimum and maximum y i , respectively.The unit square may be seen as covered with a N⋅N grid of cells.
where D h is again the Hausdorff-Besicovitch dimension, N ′ = N − 1, and L is the curve length after embedding in the unit square.It is important to observe that D s = D h only at the limit when N ′ → ∞, for all other N ′ values, D h > D s .Thus D s s obtained with same N ′ s are the only fit to be compared.D s uncertainty may be estimated through its variance [11]: where ∆y i is segment i length, distance between points (x i−1 , y i−1 ) and (x i , y i ) of the transform and ∆y is those segments' mean.D s and variances may be used to compare empiric D s values [35, Sections 5.2.1 and 5.2.4] [37] based on Vysochanskyj-Petunin inequality [55,56].

A.2. Random sequences generation for calibration purposes
As indicated in Subsection 4.1 to use them as reference in this study, Monte Carlo simulation was used to generateM = 100 traces of N = 1329 points each of white noise (see Subsection 4.0.4) of white noise.White noises simulated were sequences of Gaussian variables of type N(0, 1) [Eq.(23)].Estimated fractal dimension D s was calculated for each simulated trace as indicated in Subsection A.1, D s [Eq.( 14)] and var(D s ) [Eq. (15)].Equation ( 15) intra sequence D s variance, due to unit square-embedded waveform ∆y i in each jth sequence.Each sequence is a (short?) segment from an infinite sequence with same properties.Every sequence of length N < ∞ generated as indicated may be used to produce a different approximation to D h depending on where is the sample taken.To estimate D s and its uncertainty means were calculated for M simulated traces as The variance od D s between curves (which may be visualised as random sets N points sampled from an infinitely curve) for the M waveforms sets was determined as where var w (D s ) is the average variance within traces and var(D s,j ) calculated with Eq. ( 15).Ds,b and var t ( Ds) were used to compare the difference in D s from the empiric sequences with Monte Carlo simulated sequences with known properties.In this manner it was possible to decide if empiric sequences were white, brow , or other kind noise, spite of N < ∞ [11,37].Statistical significance of the differences was established using the Vysochanskij and Petunin inequality (V-P, details in A.6). V-P inequality allows comparing means of samples coming from a population with

Figure 1 :
Figure 1: Patients staying every day (InP) at La Fuenfría Hospital from May 1 2014 y December 19 2017.Panels are: Panel A-Number of in-patients (InP) at La Fuenfría Hospital per day during the study duration; Panel B-Daily variations of in-patients (DInP) at the Hospital [∆y in Eq. (2)]; Panel C-Hospital's daily stays (Panel A) probability density f unction (pdf, the probability of observing a given mensurable or enumerable random event) for any number of in-patients (InP) staying at the Hospital observed during the study period (•) [28], a Gauss line (N [ȳ, s[y] 2 ) with the same mean and variance (s[y] 2 ) as the set of 1329 data points making the series in Panel A (ȳ = 149.2,s[y] = 24.4);Panel D-Daily difference between admissions (Figure 2A) and discharges (Figure 2C) at the Hospital (DDiAd).Panel E-Random walk Ξ i built for DDiAd (Panel D) using Eq.(5), please note the extreme resemblance to the sequence of InP in Panel A. In all cases abscissa is number of days after May 1 2014.The largest negative or positive peaks are off scale outliers.

Figure 2 :
Figure 2: Sequences of hospitalised and daily discharges from La Fuenfría Hospital.Panels are: A-Daily admissions (Adm) sequence; B-Same as panel A, but scale modified to show only data ⩾ 0; C-Daily discharge (Dis) sequence; D-Same as panel C, but scale modified to show only data ⩾ 0. In all cases abscissa is days elapsed since May 1 2014, Ordinate is number of daily admissions or discharges determined as indicated in Secretion 2.2.Negative peak represent transcription errors of data made available for this study, perhaps positive outliers could have the same origin, but this is harder to demonstrate.

Figure 3 :
Figure 3: Example of four groups of data from the Function Recovery Uunit.(FRU).A: Total admissions (Adm) sequence (n = 22 , n runs = 11, P rrd ≈ 0.15); B, Total discharges (Dis) sequence (n = 22, n runs = 8, P rrd ≈ 0.04); C, is the sum of lengths of stay (LoS) for all in-patients (InP) in the Unit during each month (n = 23, n runs = 5, P rrd ≈ 4.5 ⋅ 10 −4 ); D, is a sequence of the average stay duration (Mean LoS) of each in-patient at the Unit (n = 23, n runs = 10, P rrd ≈ 0.13); E, along de observation period the Function Recovery Unit gained relevance and the number of beds were increased, te panel shows the changes in beds at the behind ib several months, as expenses, the analysis of this senescence was found to be non random (n = 23, n run = 5, P rrd ≈ 4.5 ⋅ 10 −4 ), actually n runs may be just in this case, the algorithm probably found very minor decimal differences between data an x in one segment; if n runs = 3, should n runs be 3 than P rrd 4.5 ⋅ 10 −4 .P s are probabilities (obtained with the Wald-Wolfovitz test) that the sequences are not randomly distributed about their medians.As indicated in the text of this communication P rrd stands for probability of random distribution about the median.In all cases abscissa is time expressed as month number in the sequence, (January 2016 = 1, November 2017 = 23).

Figure 3 .
In Figure3Cthere are 5 runs, and in Figure3Dare 9 runs.Points that are equal to ŷ are not taken into account in the analysis.Figure3presents four sets of monthly averages from the Function Recovery Uunit (FRU).Figure3A, results from the total of admitted patients (Adm) sequence (n = 22, n runs = 11, probability of random run distribution about the median P rrd is ≈ 0.15); 3B, Total discharged patients' (Dis) sequence (n = 22, n runs = 8, P rrd ≈ 0.04); 3C, is the sum of lengths of stay (LoS) for all in-patients (InP) in the Unit during each month (n = 23, n runs = 5, P rrd ≈ 4.5 ⋅ 10 −4 ); 3D, is a sequence of the average stay duration (Mean LoS) ȳ = 149.2,s[y] = 24.4).4.0.2.La Fuenfría Hospital daily admissions and discharge variations sequences.

Figure 4 :
Figure 4: Empirical Probability Distribution Functions (PDF) [28] of daily admissions and stays at La Fuenfría Hospital from May 12014 to December 19 017.Panel A: Blue ine with ∎ PDF of LFH in-patients (InP in Figure 1A); Red line with ⧫, PDFs for daily differences in admissions (Adm) and discharges (Dis), called DDiAd in Figure 1D.Panel B: Blue line with ⧫ PDF of LFH daily Admissions in LFH (called Adm in Figure 2A); Red line with ∎ PDF for LFH daily Discharged Dis in Figure2C).Panel C: Same as Paanel B, but with abscissa expanded to exclude outliers.In all cases abscissa is the value ve aare interested in, and ordinate is the estimated accumulated probability from −∞ up to the abscissa value.

Figure 6 :
Figure 6: False periodicity analysis in Rw s.Use of spectral density (ψ f j ).Panels are: Panel A-A perfectly periodic signal, the sine trigonometric function ζ(x) = sin(x π 128 ); Panel Bψ fj of the sine function shown in panel A; Panel Cψ fj of Gaussian white noise shown at Figure 5A; Panel Dψ fj of Brown Rw shown in Figure5B; Panel Eψ fj pf daily in-patients (InP ) sequence which in appears in Figure1A.Ordinate of panels B through E, is power dissipated at each frequency.The sine function depicted dissipates all its energy at a single frequency observed at a single neat peak in its ψ j (panel B).The number of hospitalised patients sequence SDf j corresponds to a Gaussian Rw without any underlying periodicity.All SD plots were filtered using a Hann window[39,65].The rapid oscillations observed at right of signals in panel B to D is an artefact due to sampling discrete points in the signal for the Fourier transformation.Rw stands for random walk,more details in the communication' text.
Figure 6: False periodicity analysis in Rw s.Use of spectral density (ψ f j ).Panels are: Panel A-A perfectly periodic signal, the sine trigonometric function ζ(x) = sin(x π 128 ); Panel Bψ fj of the sine function shown in panel A; Panel Cψ fj of Gaussian white noise shown at Figure 5A; Panel Dψ fj of Brown Rw shown in Figure5B; Panel Eψ fj pf daily in-patients (InP ) sequence which in appears in Figure1A.Ordinate of panels B through E, is power dissipated at each frequency.The sine function depicted dissipates all its energy at a single frequency observed at a single neat peak in its ψ j (panel B).The number of hospitalised patients sequence SDf j corresponds to a Gaussian Rw without any underlying periodicity.All SD plots were filtered using a Hann window[39,65].The rapid oscillations observed at right of signals in panel B to D is an artefact due to sampling discrete points in the signal for the Fourier transformation.Rw stands for random walk,more details in the communication' text.

Figure 7 :
Figure 7: Daily fluctuations of in-patients and average duration of stays for each Clinical Operative Unit recalculated every day from January 1 2015 uo to December 12 2017.A-Number of in-patients (InP ) at each Operative Unit.B-Average stay duration at each Operating Unit [ Υ d defined as in Eq. (10)].Abscissas are days elapsed from January 1 2014, ordinates are in logarithmic scale to better visualise some of sequence features.Unit initials mean: RCPU, Relapsing Chronic Patients Unit, this unit was suppressed on May 2016 and its beds were transferred to CCU; CCU, Chronic Care Unit; PCU, Palliative Care Unit; FRU, Function Recovery Unit; TU, Tuberculosis Unit; NTU, Neurrehabilitation Treatment Unit.

A. 1 .
Calculating D, approximated fractal dimension of sequences.

Table 1 :
Fractal dimension D s estimated for La Fuenfría Hospital sequences.