A tricorder is a very advanced piece of equipment. There's no doubt that it could easily determine whether someone was a klingon or human. Or even that he just wasn't human.
McCoy didn't have a tricorder when he was treating Gorkon.
Plus, being able to identify someone as a member of one certain species is entirely different from treating them when they're on the edge of death.