Cyber Security: SQL Injection
Here we calculate donations by blood type as follows:
Donations required per year = Total population * Proportion in blood group * 2.5%
Note that the annual donations required values do not quite add to 2,500,000, as would be expected, because of rounding of the blood group distribution percentages.
Thus, we can summarise the problem as follows. Given the distribution of blood types, the size of the eligible donor population, the limitations on who can donate to who, and the number of donations required for each blood group, how can we ensure that we have enough donations (with minimal wastage)?
A simple solution
On the face of it, this could be quite simple. We have estimated that 2,500,000 donations are required each year (2.5% of 100 million). An obvious solution is that we allow only donations from O Negative donors. Given that they can donate to all blood groups, we are guaranteed that the donations would be suitable, no matter the recipient. The issue however is that this would require approximately 40% of all eligible O Negative donors to donate blood each year (assuming donors only donate once per year). This seems rather ambitious!
A better solution – Part 1
Let’s reconsider and take a more systematic approach to the problem. Firstly, we use the above information, alongside our knowledge of who can donate to which blood group, to produce a range of the minimum and maximum donations required by donor blood group.
Note, the table above uses the following logic. For example:
- O Negative individuals can only receive blood from donors who are also O Negative. We estimate there to be 325,000 required O Negative donations and so we need, as a minimum, this amount of donations from O Negative donors.
- AB Positive individuals can only donate to other AB Positive individuals. However, as AB Positive recipients can receive blood from other groups, we could manage without any AB Positive donations (e.g. 50,000 O Negative donors could donate blood to AB Positive individuals instead). For this reason, the minimum required donations from AB Positive donors is 0.
- On the other hand, as AB Positive donors can only donate to individuals of the same blood group, we have a maximum of 50,000 donations. Any more and it would go to waste as no other blood group would benefit from the excess donated blood.
The table in itself is not particularly useful given how large the ranges are in each blood group. However, they do allow us to gain insight into where potential shortfalls could lie – in particular, we need at least 5% of all eligible O Negative individuals to donate blood (again assuming donors only donate once per year). One would immediately want to question whether this is achievable and how these potential donors might be encouraged to donate blood. This analysis also paves the way for exploring other solutions, such as the one which follows.
A better solution – Part 2
Let us instead look at a solution which factors in the distribution of those eligible to donate blood and optimise to produce a realistic distribution of the required donations by type.
As a starting point, consider what would happen if the proportion of blood donors of each type were the same as in the whole population. Then, the amount of donations made by each blood group would be the same as in the first table.
If we had these numbers of donors then we could, hypothetically, guarantee that everyone requiring blood does indeed receive it. How can we be so sure? Well, we could allocate the donated blood so that the blood groups of the recipient and donor are the same – e.g. 200,000 B Positive donations are made which would all be allocated to B Positive recipients. As each blood group can donate to individuals of the same blood group, this would work for everyone. The additional benefit here is that we need an equal proportion of donations across each eligible blood group population (i.e. 5% of potential donors from each blood group need to donate – assuming once again that each donor donates once per year), and so we aren’t strained by attempting to recruit a higher proportion of donations from a specific blood group (like in our first solution where almost 40% of eligible O Negative individuals were required to donate blood each year).
However, this approach also has its drawbacks. For instance, in emergency situations we may not immediately have information on the recipient’s blood type and so would instead want to use O Negative blood as it is suitable for all recipients. We also should recall that the shelf life of donations is approximately 1 month, and so we require that for each blood group, the distribution through time of donations broadly matches the demand. Furthermore, if we allocate blood donations in this way then we also should consider the transport costs/logistics if there is a disparity between where donors and recipients are situated for each blood group. The solution is also idealistic; what if the proportion of donations by blood group naturally differs from 5%? How can we adjust the allocation so that everyone who needs blood receives it?
An even better solution
At this point, you may be thinking that there are far too many variables to generalise this problem – and I would agree. So, let’s take an actuarial perspective. And what do actuaries like doing most? Well of course that must be building models.
So, I went away and built a model in Excel which allows the user to play around with the various parameters that are involved in this problem. In particular, the user can change the assumptions and set the expected number of donations made by each blood group.
The challenge however is to see if the user can correctly distribute the received donations (see the ‘Donations & Distributions’ sheet of the tool) in order to ensure that everyone who requires blood donations does indeed receive them. When downloading the attached version of the tool, I have set the donations received numbers and you should look to edit the proportions in the ‘Donations & Distributions’ sheet so that you are successful. It may be that it is not solvable at all – but I encourage you to have a go for yourself to gain an insight into this problem and the potential challenges faced.
Additionally, I would encourage you to adjust the ‘Donations made by blood group per year’ column (within the ‘Donations & Distributions’ sheet) and consider the effect this has on the required distribution of donations. In particular, who are the ‘best’ type of donors? What do we even mean by ‘best’? Think also about what a reasonable distribution of donations could look like, in the real world.
As alluded to earlier, the problem and tool showcased within this article are a simplification of the actual problem one may face (but no doubt should prove valuable insight into the dilemma) for many reasons. For instance, we may want to model stochastically the requirement of blood or even use a time series model. This would allow us to take into consideration the randomness of accidents and emergencies leading to blood requirements which could be combined with a more stable assumption about the needs of recipients who have more predictable, longer-term requirements. We could also build in allowance for differing levels of demand at various times of year.
And how about projecting the amount of donations? This too wouldn’t be uniform – could we use a time dependent model here? We also did not specify the relationship between the number of donors and the number of donations (the analysis within this article only considers the number of donations made). In fact, it is possible to donate roughly once every 12 (for men) to 16 (for women) weeks , and so our model could build in assumptions about the distribution and frequency of repeat donors.
There are also potentially transportation and additional logistical issues with regards to where the donors and recipients are located, particularly if the proportions of donors and recipients are not aligned locally. Would this mean that advertising needs to be targeted because for instance, it would be cheaper to pay everyone £10 for donating O Negative blood in London rather than transporting an excess from Edinburgh (for example)? Is this ethical?
It is also worth noting that it is better to have an excess which has uses in research and education, rather than to have a deficiency and risk patient welfare. However too much of an excess is also not beneficial because there would be costs related to the extraction of, and subsequent storage and disposal of, this unused blood.
Finally, as with any model, one should critically analyse and validate every aspect of it to ensure that it is suitable for the problem at hand (given I have just sat CP1, I could additionally list the requirements for building and validating a good model, but I will leave that as an exercise for the reader to think about).
Why give blood?
I wanted to conclude by discussing why it is important to donate blood if you can do so. I have been fortunate to not require such donations, but I have relatives who required blood following accidents, and I am thankful that they were able to have near immediate access to this.
As someone who decided to donate despite being utterly terrified of needles, I was surprised by how relatively painless the entire process was and would not have donated again were this not the case.
If for no other reason, then it is an opportunity for you to make a genuine difference to someone’s life (and their family).
If you are interested in donating (and live in the UK) then the following link will provide you with further information – Can I give blood? – NHS Blood Donation
The model used for this article can be downloaded by clicking the following link: Blood Donation Tool
* It is also possible to donate platelets (which can be stored for up to 7 days) and plasma (which can be stored for up to 3 years).
‡ This is reasonable given that the NHS estimates that approximately 5000 donations are required each day in the UK , which has a population of approximately 70 million. This equates to an ‘annual required blood donations relative to total population’ metric of 2.6%.