I don't think a doctor can determine if a person has the capacity to contract. In some estate planning, in order to prevent future problems when there is an "unsusual" gift/bequest, some lawyers want a letter from a physician regarding the client's competency. However, competency is a legal matter and not a medical one. The doctor can provide evidence of deficits. This is done in what can be termed a Capacity Declaration which specifically addresses each of the statutory mental functions which the doctor finds deficiencies.
At least that's how it works in California. Each state has it's own codes but will probably say the same thing.
However, even if the father is found incompetent, don't most states provide the contract is voidable and not void? Can anyone but the estate (or the person) sue to disclaim the contract?
Also, if the contract can be found to not exist, doesn't there need to be a restitution of all monies paid to re-obtain the land? Since the land was bought at FMV, why go through the fight?
Just out of curiosity, is this a family fight? One where the will splits all money equally and gives the property to little Susie? Now, little Susie is upset as she is only getting part of what she wants from the death of dad?