YES. Very much. Because Sherlock Holmes is inspired from Dr. Joseph Bell.
To illustrate this, he would often pick a stranger, and by observing him, deduce his occupation and recent activities. These skills caused him to be considered a pioneer in forensic science, (forensic pathology in particular), at a time when science was not yet widely used in criminal investigations.
Dr Joseph Bell was a doctor and Dr. Arthur Conan Doyle was his student.
Doyle later went on to write a series of popular stories featuring the fictional character Sherlock Holmes, who Doyle stated was loosely based on Bell and his observant ways.
Does it really work all the time?
(IMHO) No, it depends on observer.