Assuming there are expiration dates on living wills, those dates could be listed in the database. Actually, more importantly, folks having their living wills entered into the database could be TOLD that they need to renew their living will at specific intervals. Right now, most folks assume that once they make a living will they are set, and never need to update it. As things currently stand, many people think they have valid living wills, when realistically those wills would not be honored due to their age. Folks need to be told that living wills don't last forever. Even if there is no expiration date, doctors may be loath to honor it if its very old. That's extremely problematic since people aren't updating their living wills who would choose to update them, if they only knew they needed to do so. So, part of the solution should include standardizing how long Living Wills are good for, and making sure everyone knows that they need to renew their living will at specific intervals. (Say every 5 years.) Actually, a database could help with that, since it could automatically contact folks when their living will was about to expire, and let them know that it needed to be renewed.
I don't think HIPPA would be an issue since, unlike immunizations, putting your Advanced Directives on the database could be voluntary. I imagine most folks who have advanced directives would want theirs included though, as it would significantly increase the likelihood that your wishes would be known and followed. As far as state versus nationwide goes: I don't know what the legality would be, but it would be great if the database could be nationwide (like organ donor databases) since people move, do business in, and vacation in other states. The bigger problem I see re: state versus national, is that states have different requirements (format, notarizing, etc.) That would require standardization, and presumably would have to be addressed by congress.