For three books set in the antiques subculture, I held to that resolve, but then I realized that a mainstream novel I'd written, but never gotten published, many years earlier would work very nicely as a mystery - but only if it had a medical background. By that time, I'd learned that what a story wants, a wise author gives it, so I went ahead and wrote FIRST, DO NO HARM, which to date has received the best reviews (including a starred review in Booklist) of any of my novels.
Never mind. I went on to write three books with ragtime backgrounds, then came up against the realization that my idea for the next book needed a medical background. So I'm just now finishing UNFINISHED BUSINESS (take that as you will). And just this afternoon, it hit me that my thoughts for the next couple of books demand...that's right. A medical background.
Write what you know, know what you write, write what you love, love what you write. Nah. Just write what comes, and don't think too hard about it.