Part of job is to save people but there may come a time where a patient has a will which states they should not be resuscitated. I have to obey their will by law. Is this haram?

If the patient is not Muslim, then his wish is respected.