This is an openaccess article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR Medical Informatics, is properly cited. The complete bibliographic information, a link to the original publication on https://medinform.jmir.org/, as well as this copyright and license information must be included.
Platelets are a valuable and perishable blood product. Managing platelet inventory is a demanding task because of short shelf lives and high variation in daily platelet use patterns. Predicting platelet demand is a promising step toward avoiding obsolescence and shortages and ensuring optimal care.
The aim of this study is to forecast platelet demand for a given hospital using both a statistical model and a deep neural network. In addition, we aim to calculate the possible reduction in waste and shortage of platelets using said predictions in a retrospective simulation of the platelet inventory.
Predictions of daily platelet demand were made by a least absolute shrinkage and selection operator (LASSO) model and a recurrent neural network (RNN) with long shortterm memory (LSTM). Both models used the same set of 81 clinical features. Predictions were passed to a simulation of the blood inventory to calculate the possible reduction in waste and shortage as compared with historical data.
From January 1, 2008, to December 31, 2018, the waste and shortage rates for platelets were 10.1% and 6.5%, respectively. In simulations of platelet inventory, waste could be lowered to 4.9% with the LASSO and 5% with the RNN, whereas shortages were 2.1% and 1.7% with the LASSO and RNN, respectively. Daily predictions of platelet demand for the next 2 days had mean absolute percent errors of 25.5% (95% CI 24.6%26.6%) with the LASSO and 26.3% (95% CI 25.3%27.4%) with the LSTM (
Both models allow for predictions of platelet demand with similar and sufficient accuracy to significantly reduce waste and shortage in a retrospective simulation study. The possible improvements in platelet inventory management are roughly equivalent to US $250,000 per year.
For blood centers, it is key to keep a balance between shortage and outdating of blood products to secure both cost efficiency and sufficient care for patients. This is especially true for shortlived blood products such as platelets. Forecasting demand has recently gained fresh attention as a way to address the problem, and the rise of
Platelet transfusion is an indispensable part of modern medicine [
As with other blood products, platelets need to be readily available at all times as demand might occur on short notice without obvious foreboding and timely transfusion is often critical [
Keeping sufficient stock is especially difficult with platelets because of their short shelf life of 57 days, including time for preparation and quality control [
In a recent systematic review, Flint et al [
Several authors have investigated different univariate time series models to predict platelet demand, including moving averages, weighted moving averages, exponential smoothing, Winters models, and autoregressive moving averages (ARIMA) [
More recent studies have included additional clinical data as predictors in multivariate models [
Guan et al [
During the course of this study, Motamedi et al [
According to the current state of the art, LASSO and LSTM networks seem to be very promising models for the prediction of platelet demand. However, the accuracy of any prediction model may vary between different sites because of the amount and quality of the available data. Furthermore, it is unclear how accurate a prediction needs to be to enable an actual reduction in waste and shortage. This may also vary between sites supposedly because of differences in their respective blood inventories, such as shelf life of platelets, average daily transfusion volume, production and quality control practices, or availability of donations.
Therefore, the aims of this study are 2fold: the first aim is to predict daily platelet demand at the RWTH Aachen University Hospital (UKA) using both a LASSO and an LSTM network. The second aim is to design a simulation model of the blood inventory at UKA, establish an ordering strategy based on the predictions, and quantify possible reductions in waste and shortage rates as compared with retrospective data. To the best of our knowledge, this is the first study to compare these 2 models in terms of both prediction accuracy and possible reduction in waste and shortage rates based on predictiondriven simulations.
According to the aims of this study, our approach was 2fold (
General approach: input data are fed to 2 separate prediction models—least absolute shrinkage and selection operator and recurrent neural network. Predictions of platelet demand are passed to a simulation model of the blood bank inventory. Possible reductions in waste and shortage rates are calculated in comparison with retrospective data. BBI: blood bank inventory; LASSO: least absolute shrinkage and selection operator; RNN: recurrent neural network.
All data were sourced from the UKA EHR. No personal patient data were used. The local ethics committee approved the data acquisition and analysis (code EK282/19). For the period from January 1, 2008, to December 31, 2018, we obtained data in three categories: (1) platelet ingoings and outgoings as recorded by the transfusion department; (2) census data for all wards, outpatient clinics, and operation rooms; and (3) complete blood count.
Data were obtained as a daily time series and aggregated in a single database. Platelet ingoings and outgoings were grouped by source (inhouse production and purchase) and disposition (use, waste, sales, and quality control) and documented as platelet units per day. Census data were documented as patients per day grouped by inpatient clinics, outpatient clinics, surgeries, and planned surgeries for the next day and subgrouped by department. Complete blood count data other than platelet count were documented as the number of measurements out of the norm per day. Platelet count was recorded as the number of measurements per day within specific intervals with regard to platelet transfusion guidelines: <5/nL, 510/nL, 1020/nL, 2050/nL, 5070/nL, 70100/nL, and 100150/nL [
Within the UKA EHR, zeroes (eg, no platelets transfused on a given day) are not documented and are represented as missing values. Therefore, we used zeroes to represent the missing values rather than applying imputation. The only exception is census data, where a missing value might indicate that the given department did not exist at that point. Therefore, all departments that did not continually exist throughout the examined 10year period were excluded. All census data with <400 nonzero values were excluded as it was assumed that these time series did not contain significant information. During the initial inspection of the data, we found that a considerable amount of platelet traffic data was mislabeled in terms of disposition. Over the years, changing collaborations with other clinics and local practices as well as a change in the inventory software have resulted in inconsistent data labeling. A particular problem here was the units that were given to partner clinics but labeled as used inhouse rather than sold. Therefore, all platelet traffic data were systematically verified for correct labeling. Mislabeled data were corrected if possible and excluded otherwise. Less than 1% (305/46,205, 0.66%) of the total transfusion records were excluded because of this problem. The entire data set is provided in
All features from the census and complete blood count data with a correlation of
The UKA transfusion department collects and prepares platelets by apheresis. Registered donors have regular appointments or are called in individually for donation. The entire production chain, including donor activation, platelet preparation, and quality control, takes 2 days (1 day for donor activation and 1 day for preparation and quality control). Donors are only called on Monday through Friday. Therefore, no fresh platelets arrive on Sundays or Mondays. After quality control, platelets have a remaining shelf life of 4 days. In case of slender stock, additional platelets are purchased from other hospitals or local providers such as the local section of the German Red Cross Society. Such an
For retrospective simulations of the blood bank inventory, production orders, purchases, discards, and stock are calculated at the end of each day of the observation period using an iterative approach. The stepwise calculation model described below was recalculated for each day of the time series.
As no fresh platelets arrive on Sundays and Mondays, different ordering strategies and prediction intervals for demand are required for different days of the week. Platelets ordered on day
We established the stepwise calculation model shown in
After moving through the stepwise calculation,
We arrived at this definition because the cost for a single platelet unit is approximately US $350 when produced locally and planned in advance. Buying platelets in an emergency is more expensive. The actual price varies widely depending on several factors, such as the total amount bought and costs for transportation. On average, the price of a platelet unit bought in an emergency is almost double compared with preplanned production. The weight in Equation 9 was rounded up to also punish the possible delay in transfusion because of transportation time. Note that the blood bank inventory allows for temporarily negative values for stock when moving through the stepwise calculation process given in
Blood bank inventory stepwise calculation model. For each day of the time series, initial values are set according to Equations 27. This stepwise calculation is then carried out and, finally, total stock at end of day is calculated according to Equation 8.
Standard supervised learning was used to predict platelet demand for the next 2 and 4 days. Predictions were made using rollingoriginrecalibration evaluation as described by Bergmeir and Benítez [
The accuracy of the predictions was measured with RMSE, the Pearson correlation coefficient of the predicted and true values (
The first model was a LASSO as described by Tibshirani [
The second prediction model was an RNN. We used a sequential model from the TensorFlow (Google Brain Team) library (
Architecture of the recurrent neural network used for prediction of platelet demand. Data are first passed to a long shortterm memory layer followed by a flatten layer and a dense layer to generate an integer output to our regression problem. LSTM: long shortterm memory.
Hyperparameters of the deep learning model and their respective search space for optimization via randomized grid search.
Parameter  Search space 
Batch size  50, 100 
LSTM^{a} units  10, 50 
Dropout rate  0%50%, steps of 5 
L1 regularizer  10^{−9}, 10^{−7}, 10^{−5}, 10^{−3} 
L2 regularizer  10^{−9}, 10^{−7}, 10^{−5}, 10^{−3} 
Flatten layer activation function  ReLU^{b}, linear 
^{a}LSTM: long shortterm memory.
^{b}ReLU: rectified linear unit.
During the observed period, 46,205 platelet units where transfused at UKA. Daily transfusions ranged between 0 and 39 with an average of 11.50 (SD 6.02). Units transfused per year increased from 2566 in 2008 to 5891 in 2018. Daily averages were significantly different for different days of the week as determined by 1way analysis of variance (ANOVA;
A total of 4654 platelet units expired during the observed 10 years. The daily average expiration was 1.16 (SD 2.77, range 032). Furthermore, 1way ANOVA showed significant differences in daily platelet expiration across different days of the week (
Emergency purchases were made for a total of 2988 units, with a daily mean of 0.74 (SD 2.77, range 027). Furthermore, 1way ANOVA showed significant differences in daily platelet purchases across different days of the week (
Top to bottom: transfusions, outdating, and emergency purchase of platelet units. Left: daily patterns. Right: averages by day of the week.
The retrospective simulations of our blood bank inventory using the abovedescribed blood bank inventory and prediction models yielded the results described in this section. Blood bank inventory simulation was performed separately for predictions made by the LASSO and RNN models. Simulated outdating rates were similar for both prediction methods, whereas purchase and overall cost as defined by Equation 9 were lower with the RNN forecasts. With the LASSO, outdating and shortage were reduced from 11% to 4.93% and from 7.05% to 2.11%, respectively. Using the predictions of the RNN, outdating was reduced to 5%, and shortage fell to 1.68%. These reductions in outdating and shortage are roughly equivalent to savings of US $250,000 per annum. Simulated total cost was US $1.33 million with the LASSO and US $1.241 million with the RNN (Equation 9).
The target values for platelet stock at the end of each day (
Simulated cumulative outdating, purchase, and cost (as defined by Equation 9) compared with retrospective data. LASSO: least absolute shrinkage and selection operator; RNN: recurrent neural network.
Forecast performance of the least absolute shrinkage and selection operator (LASSO) and recurrent neural network (RNN) for predictions of platelet demand for the next 2 and 4 days.
Forecast period and method  RMSE^{a} (95% CI)  MAPE^{c} (%; 95% CI)  

.09 

.88 

.10  

LASSO  6.77 (6.576.98) 

0.73 (0.710.74) 

25.51 (24.5626.51) 



RNN  6.94 (6.747.15) 

0.71 (0.700.73) 

26.32 (25.3327.41) 



<.001 

.07 

.001  

LASSO  10.78 (10.4611.13) 

0.74 (0.720.75) 

18.11 (17.5918.61) 



RNN  11.52 (11.1711.87) 

0.69 (0.670.71) 

19.22 (18.4619.82) 

^{a}RMSE: root mean squared error.
^{b}Pearson correlation coefficient of the predictions and the true values.
^{c}MAPE: mean absolute percent error.
Longitudinal time series plots of demand predictions and real values of platelet demand. LASSO: least absolute shrinkage and selection operator; RNN: recurrent neural network.
As described above, the LASSO performs feature selection and produces interpretable models. The most influential predictors of platelet demand for the next 2 and 4 days are listed in
Strongest predictors of platelet demand in the least absolute shrinkage and selection operator model. Mean predictor weights over all model iterations.
Forecast and predictor  Predictor weight, mean (SD)  



PL7^{a}  3.04 

Weekday Friday  −2.12 

Weekday Thursday  −2.08 

I4^{b}  1.54 

Weekday Saturday  −1.17 

CBC_PL_cont 2010^{c}  1.17 

PP^{d}  0.99 

OP_P_NC^{e}  0.99 



PL7  1.68 

Weekday Saturday  −1.14 

Weekday Friday  −1.01 

CBC_PL_cont 2010  0.80 

I4  0.64 

OP_P_NC  0.61 

PP  0.60 

OP_P_GG^{f}  0.60 
^{a}PL7: platelet transfusions over previous 7 days.
^{b}I4: number of patients in the oncology ward.
^{c}CBC_PL_cont 1020: daily number of complete blood count essays with platelet count between >10/nL and ≤20/nL.
^{d}PP: number of patients in the psychiatry wards.
^{e}OP_P_NC: number of planned surgeries for the next day in the neurosurgery department.
^{f}OP_P_GG: number of planned surgeries for the next day in the vascular surgery department.
The results of this study show that it is possible to predict platelet demand at UKA with high accuracy using both approaches investigated: LASSO and RNN with LSTM. These results confirm previous work and, as a particularly relevant aspect, support the generalizability of these models to different sites [
Furthermore, the simulations of the blood bank inventory suggest that these predictions can be used to reduce waste and shortage of platelets at UKA by a considerable amount. The implementation of such a prediction system at UKA might lead to savings as high as US $250,000 per year. Although several studies have investigated the prediction of platelet demand, very few have examined the extent to which these predictions can be used to improve inventory management via simulations or field tests [
Both the LASSO and RNNs with LSTM have previously been described as powerful tools for predicting platelet demand [
The prediction accuracy of the RNN was marginally inferior to that of the LASSO in our study. This was previously reported by Motamedi et al [
The most influential predictors identified by the LASSO (
As somewhat of an unexpected finding, we observed that the blood bank simulation provided better results in terms of total cost and shortage rates when using RNN predictions, whereas, in accordance with previous results, the predictions made with the LASSO were slightly better in terms of RMSE,
Therefore, we might be missing out on some further reduction in waste and shortage rates by using MSE as a loss function to train the prediction models. Guan et al [
With the aforementioned in mind, the modular structure of our system with the prediction models and the blood bank inventory as independent components is a limitation of our study. However, it also has several advantages. First, it reduces the complexity of the overall system. On the one hand, this allows for simple interpretation and comparison of the prediction models. In contrast, it enables the modeling of a very complex blood inventory, incorporating separate predictions for weekdays and weekends as well as emergency purchases while keeping training times and computational expense manageable as the prediction models do not need to be retrained during the grid search for ideal blood bank inventory parameters. This flexible modular approach will also allow for the addition of further modules, such as a component accounting for blood types in the predictions.
The absence of such a module in our system is another limitation of this study. Although relevant to platelet transfusion, our forecasts do not account for ABO blood types and Rh status [
Although RMSE and MAPE are commonly used in the evaluation of time series forecasts, these error measures might not be the ideal choice here. Further to the potential problems discussed above, their sensitivity to outliers is another limitation [
Although the ordering strategy given by Equation 1 does consider current stock, it neglects the remaining shelf life of units in stock. Adapting orders to the expiry profile of current stock might be beneficial and should be investigated in further studies.
In future applications, the prediction and simulation environment presented here could be extended to other perishable goods whose consumption data show similar characteristics. The following data characteristics may be helpful in generalizing this approach to other problems: (1) the data of platelet demand investigated here are stationary in the presence of a trend, and (2) the data have a strong pattern of autocorrelation with weekly seasonality. From a practical point of view, the short shelf life and high variance of daily demand for platelets are important characteristics that should be considered to identify suitable problems for this approach. Our system could also be used to investigate possible optimization of the blood bank inventory, such as collection of platelets during weekends, by comparing savings in waste and shortage with additional staff costs.
Both a LASSO model and an RNN with an LSTM layer can predict platelet demand at the UKA with high accuracy. This is in accordance with previous studies and further supports the generalizability of these models to different sites. The retrospective simulations of the blood inventory at the UKA presented here show that the predictions of both models enable a significant reduction in waste and shortage rates of platelets. Further research is needed to exploit the full potential of deep learning models for the prediction of platelet demand. Furthermore, there is a need for models that take into account ABO blood types in their predictions.
Quantitative data used to construct the figures and tables.
artificial neural network
analysis of variance
autoregressive moving averages
electronic health record
least absolute shrinkage and selection operator
long shortterm memory
mean absolute percent error
mean squared error
root mean squared error
recurrent neural network
RWTH Aachen University Hospital
All authors have agreed on the final version and meet at least one of the following criteria: substantial contributions to conception and design; acquisition of data; or analysis and interpretation of data, drafting of the paper, or revising it critically for important intellectual content.
None declared.