If a patient is incapacitated and there is no one considered as their next of kin then the doctor should be the decision maker. The doctor has sworn to do no harm. They not only know and understand what is wrong, but they, in most cases know how to best treat the problem at hand.
In the even of an incapacitated patient having no advance directive, the spouse or closest relative should be tasked with making the decisions for the patient; a closest relative being decided upon by how frequently this person interacted with the relative not only by simple lineage. In this case this person would have been familiar with the choices the incapacitated patient would choose themselves and want. Only a person who truly understands the patient should be permitted to make decisions.