In a written judgment published on Tuesday, Lady Tait said that while the probability of a blood transfusion being required is small, the consequences of it being required but not given would be severe, including a risk of death.
She added that there would likely be insufficient time to seek a court order once any risks developed.
Lady Tait said any transfusion would be administered only if it was deemed necessary to avoid significant harm, including death.
In the judgement, Lady Tait said she wrote an opinion because a Scottish court had not previously considered the issues in the case in respect of people under the age of 16 who had “capacity”.
She wrote about how the Court of Session can authorise treatment for a child who does not have capacity and who cannot consent to medical treatment
Lady Tait also wrote about cases examined by English courts, before concluding that in the context of the case brought before the court, it would be in the best interests of the child that the order be granted.