What you want is a signed Advanced Directive. This will need to follow you thorugh a situation or whatever.
you will have to state that you do not want heroic measures taken , in case of catasrophic injury, or such
as well as subsistence machinery.
I don't know if there is software for this,but a hospital can advise you of your rights.
I had my lawyer draw up my Living Will and Health Care Proxy but there are a number of programs out there for wills. You may wish to check out Quicken WillMaker Plus. You can look at some info on it here: http://www.writeexpress.com/n/living-will.html.