A diagnosis is an accurate and precise account of the nature or cause of something.
Medical diagnosis is the best-known field, but diagnosis can be applied to any subject. Whereas a doctor diagnoses what is wrong with a patient, a motor mechanic can diagnose the fault in a car. In all cases they replace a vague query, such as "My car will not start", with an exact analysis, such as "It's out of petrol". Notice the diagnosis is precise enough so the solution can be seen.