It is a very tricky moral dilemma. If doctors can betray confidences then people who want to keep their records private will avoid getting medical help, and those in the position of the daughter will still be in the dark.
On the other hand, if a patient has a communicable disease, for instance, a doctor is legally obliged to isolate them (and anyone with whom they have been in contact?), which is done for the common good.
Arguably, telling someone that they are at risk of illness is also for the common good; but it opens cans of worms. Do we have a right to know if we have siblings, for instance? Or if a baby is adopted should the mother be able to keep its birth private? What about STIs? If they aren’t confidential, I can imagine that numbers of people seeking treatment will fall, but at the same time, those who have been exposed to risk could have complications if they aren’t treated. There are lots of examples of situations where there is a real dilemma, and it’s debatable whether they can be treated on a case by case basis, as the same rules should apply to everyone.