Deconstructing the diagnostic reasoning of human versus artificial intelligence