Andalusia allows you to register a living will, a declaration of what treatment you do or do not want to receive at the end of your natural life.
It allows you to authorise doctors to turn off your life support machine if you are in a vegetative state, or vice-versa; inscribe religious beliefs into your medical treatment if you are unable to act for yourself, etc, etc.Up to now, you had to physically go to a special office to inscribe your will, or, if house / hospital bound, an exemption could be made and the documents bought to you.
However, you can now register your Voluntad Vital online:
https://www.juntadeandalucia.es/salud/rv2/inicioCiudadania.action
(You need an electronic ID to do it).
Almeria360.es reckons 1,900 Almerienses (or about 3.9 per thousand) have so far registered their living will.