Advancement death to anything detection

I am trying to write an advancement in a datapack which detects when a player dies to anything (entity, fall, anvil etc) but I cannot see how to do it
Continue to help post