Recently, my ex-husband, the father of my 2 sons died. None of us knew he had a living will, or if he had one, where it was kept. By chance, we found it 2 weeks after he entered the hospital. It changed EVERYTHING. Not only in terms of treatment, but also in removing incredible stress from the family who thought, but couldn't be sure, they knew he would not want to be kept alive in this situation. Before we found it, at the family's request, the hospital removed his ventilator. (Note: The hospital would not even have done this if the family hadn't been all on the same page - and not all families are.) But the hospital would not remove the feeding tube without a notarized living will - which we didn't know existed. Purely by chance, we found his fully notarized living will in a file box in his apartment. It not only stated no feeding tube, it also stated no hydration. Once we presented it, the hospital complied with his wishes, removing hydration and feeding tube, and sending him to a hospice to die peacefully as he wished, surrounded by family and friends. Just as importantly, his family no longer faced the stress and guilt of making a decision to withdraw all life support when they couldn't be absolutely, 100% sure that was what he would want. (And there were no longer recriminations by friends who thought the family might have some sort of ulterior motive in making the decision to remove life support.)
A centralized database where all living wills were kept would mean living wills could always be found, & should always be searched for by hospitals & family. It would maximize the chance your wishes would be followed, and minimize stress, guilt, and fights between those you love most at the most difficult moments.