This excerpt is taken from the book of Fadhilat al-Shaykh Mubashir Ahmad Rabbani, may Allah have mercy on him, Ahkam wa Masail Ramadan.
Ruling on Taking a Small Amount of Blood During Fasting (Laboratory Tests, etc.):
Question:
What is the ruling if a small amount of blood is taken from the fasting person's right hand for a chemical analysis (laboratory test) during Ramadan?
Fatwa:
Taking a small amount of blood for chemical analysis in this manner does not invalidate the fast; rather, due to necessity and need, this action is excusable and is not among those matters that invalidate the fast according to the rulings of Shari'ah.