You can read “The Resident Patient” on WikiSource. (General Ferguson’s name may also be drawn from Holmes; there’s a character with that name in “The Problem of Thor Bridge”.
Wild Geese guy: So, Dr. Trevelyan, I’ve been wondering…
Trevelyan: Keep quiet for a moment. I need to listen to your pulse.
Guy: What do you need to know, beyond that I have one?
Trevelyan: Okay, I’ve got it. What were you asking?
Guy: It’s like this, Doc…
When I was a kid, I read all the old classic horror books. Dracula, Frankenstein, everything. And now the Wild Geese work for a woman right out of Dracula. Literally! Her granddad’s in the book!
Do you think that’s true of other old books? Could there be literary characters all over England? Descendants of Sherlock Holmes, or Oliver Twist, or…
You’re looking at one. Say ah.
* Wow! Where? Are you descended from an adventurer, or an explorer, or what?
Trevelyan: In the second volume of the collected Sherlock Holmes stories, the case of “The Resident Patient” is brought to Holmes by my grandfather, Dr. Percy Trevelyan.
**That’s not as cool as I expected.
Trevelyan: Yeah, I get that a lot.