From IFWiki

A fairly rare meta-command that gives a report of a player character's physical condition. DIAGNOSE, where it is implemented, gives a response such as "You are in good health" or "You are close to death". Games that incorporate this meta-command include elements like starvation, poisoning, or other puzzles involving a slow death. These puzzles need to be stopped within a certain number of moves.