In order to provide for a planned longer absence, e.g. a stay abroad or medical intervention, you can grant a general power of attorney to a trusted person. To make provisions for a sudden and permanent incapacity of judgment, an advance care directive is required.